From 5df19ac536de6b1d3628e4367642ecbf5bf09695 Mon Sep 17 00:00:00 2001 From: Ben Fox-Moore Date: Thu, 8 Jan 2015 23:43:05 +0100 Subject: [PATCH] Fix multipart rars causing the same extracted video to be postprocessed more than once --- sickbeard/processTV.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sickbeard/processTV.py b/sickbeard/processTV.py index c5da4dbd..e598729c 100644 --- a/sickbeard/processTV.py +++ b/sickbeard/processTV.py @@ -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)