Fix multipart rars causing the same extracted video to be postprocessed more than once

This commit is contained in:
Ben Fox-Moore 2015-01-08 23:43:05 +01:00
parent 8b84e4f4bc
commit 5df19ac536
1 changed files with 5 additions and 1 deletions

View File

@ -336,7 +336,11 @@ def unRAR(path, rarFiles, force):
continue
rar_handle.extract(path=path, withSubpath=False, overwrite=False)
unpacked_files += [os.path.basename(x.filename) for x in rar_handle.infolist() if not x.isdir]
for x in rar_handle.infolist():
if not x.isdir:
basename = os.path.basename(x.filename)
if basename not in unpacked_files:
unpacked_files.append(basename)
del rar_handle
except Exception, e:
returnStr += logHelper(u"Failed Unrar archive " + archive + ': ' + ex(e), logger.ERROR)