From 53215d87eea6f49cbafaeff11294dd91a4e22173 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Tue, 31 May 2016 00:44:30 +0100 Subject: [PATCH] [#2077] [Extractor] Ignore the remaining rar part files * Bump version to 0.6 --- deluge/plugins/Extractor/deluge/plugins/extractor/core.py | 5 +++++ deluge/plugins/Extractor/setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/deluge/plugins/Extractor/deluge/plugins/extractor/core.py b/deluge/plugins/Extractor/deluge/plugins/extractor/core.py index 5e9615aa5..4ddba3108 100644 --- a/deluge/plugins/Extractor/deluge/plugins/extractor/core.py +++ b/deluge/plugins/Extractor/deluge/plugins/extractor/core.py @@ -123,6 +123,11 @@ class Core(CorePluginBase): elif file_ext not in EXTRACT_COMMANDS or file_ext_sec == '.tar': log.debug("Can't extract file with unknown file type: %s", f["path"]) continue + elif file_ext == ".rar" and "part" in file_ext_sec: + part_num = file_ext_sec.split("part")[1] + if part_num.isdigit() and int(part_num) != 1: + log.debug("Skipping remaining multi-part rar files: %s", f["path"]) + continue cmd = EXTRACT_COMMANDS[file_ext] fpath = os.path.join(tid_status["download_location"], os.path.normpath(f["path"])) diff --git a/deluge/plugins/Extractor/setup.py b/deluge/plugins/Extractor/setup.py index ed1e18729..a3b7391ab 100644 --- a/deluge/plugins/Extractor/setup.py +++ b/deluge/plugins/Extractor/setup.py @@ -16,7 +16,7 @@ from setuptools import find_packages, setup __plugin_name__ = "Extractor" __author__ = "Andrew Resch" __author_email__ = "andrewresch@gmail.com" -__version__ = "0.5" +__version__ = "0.6" __url__ = "http://deluge-torrent.org" __license__ = "GPLv3" __description__ = "Extract files upon torrent completion"