Get create and modified date to check if unpacking. fix #325
This commit is contained in:
1 parent
e114d871c5
commit
9018d5a585
1 file changed
+13
-4
@@ -296,13 +296,22 @@ class Scanner(Plugin):
|
|||||||
# Check if movie is fresh and maybe still unpacking, ignore files new then 1 minute
|
# Check if movie is fresh and maybe still unpacking, ignore files new then 1 minute
|
||||||
file_too_new = False
|
file_too_new = False
|
||||||
for cur_file in group['unsorted_files']:
|
for cur_file in group['unsorted_files']:
|
||||||
file_time = os.path.getmtime(cur_file)
|
file_time = [os.path.getmtime(cur_file), os.path.getctime(cur_file)]
|
||||||
if file_time > time.time() - 60:
|
for t in file_time:
|
||||||
file_too_new = tryInt(time.time() - file_time)
|
if t > time.time() - 60:
|
||||||
|
file_too_new = tryInt(time.time() - t)
|
||||||
|
break
|
||||||
|
|
||||||
|
if file_too_new:
|
||||||
break
|
break
|
||||||
|
|
||||||
if file_too_new:
|
if file_too_new:
|
||||||
log.info('Files seem to be still unpacking or just unpacked (created on %s), ignoring for now: %s' % (time.ctime(file_time), identifier))
|
log.info('Files seem to be still unpacking or just unpacked (created on %s), ignoring for now: %s' % (time.ctime(file_time[0]), identifier))
|
||||||
|
|
||||||
|
# Delete the unsorted list
|
||||||
|
del group['unsorted_files']
|
||||||
|
|
||||||
|
continue
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Group extra (and easy) files first
|
# Group extra (and easy) files first
|
||||||
|
|||||||
Reference in new issue
Block a user