From b8e03b1b9d15bcb5d248e756735d10d22ac395ba Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Thu, 25 Jul 2013 22:12:22 +0930 Subject: [PATCH] don't include 720p or 1080p as "parts". fixes #167 --- TorrentToMedia.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TorrentToMedia.py b/TorrentToMedia.py index 864ca54b..a5758aa6 100755 --- a/TorrentToMedia.py +++ b/TorrentToMedia.py @@ -98,7 +98,8 @@ def main(inputDirectory, inputName, inputCategory, inputHash, inputID): except: Logger.exception("MAIN: Failed to link file: %s", file) elif fileExtension in compressedContainer: - if re.search(r'\d+', os.path.splitext(fileName)[1]) and os.path.dirname(filePath) in extracted_folder: # find part numbers in second "extension" from right, if we have more than 1 compressed file in the same directory. + # find part numbers in second "extension" from right, if we have more than 1 compressed file in the same directory. + if re.search(r'\d+', os.path.splitext(fileName)[1]) and os.path.dirname(filePath) in extracted_folder and not (os.path.splitext(fileName)[1] in ['.720p','.1080p']): part = int(re.search(r'\d+', os.path.splitext(fileName)[1]).group()) if part == 1: # we only want to extract the primary part. Logger.debug("MAIN: Found primary part of a multi-part archive %s. Extracting", file)