diff --git a/deluge/plugins/extractor/extractor/core.py b/deluge/plugins/extractor/extractor/core.py index 7df86a447..50f3faf26 100644 --- a/deluge/plugins/extractor/extractor/core.py +++ b/deluge/plugins/extractor/extractor/core.py @@ -132,11 +132,8 @@ class Core(CorePluginBase): files = tid.get_files() for f in files: cmd = '' - file_ext = os.path.splitext(f["path"])[1] - file_ext_sec = os.path.splitext(os.path.splitext(f["path"])[0])[1] - if file_ext in (".gz", ".bz2", ".lzma", ".xz") and file_ext_sec == ".tar": - cmd = EXTRACT_COMMANDS[".tar" + file_ext] - elif file_ext in EXTRACT_COMMANDS: + file_ext = os.path.splitext(os.path.splitext(f["path"])[0])[1] + os.path.splitext(f["path"])[1] + if file_ext in EXTRACT_COMMANDS: cmd = EXTRACT_COMMANDS[file_ext] else: log.error("EXTRACTOR: Can't extract unknown file type: %s", file_ext) @@ -146,7 +143,7 @@ class Core(CorePluginBase): fpath = os.path.join(tid_status["save_path"], os.path.normpath(f["path"])) # Get the destination path - dest = os.path.normpath(self.config["extract_path"]) + dest = os.path.normpath(self.config["extract_path"]) if self.config["use_name_folder"]: name = tid_status["name"] dest = os.path.join(dest, name)