diff options
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/hooks/ExtractArchive.py | 11 | ||||
-rw-r--r-- | module/plugins/internal/UnRar.py | 2 | ||||
-rw-r--r-- | module/plugins/internal/UnZip.py | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index 16942bef0..8b3b4e310 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -58,7 +58,7 @@ from module.utils import save_join, uniqify class ExtractArchive(Hook): __name__ = "ExtractArchive" __type__ = "hook" - __version__ = "1.00" + __version__ = "1.01" __config__ = [("activated" , "bool" , "Activated" , True ), ("fullpath" , "bool" , "Extract full path" , True ), @@ -135,7 +135,7 @@ class ExtractArchive(Hook): self.logInfo(_("Package %s queued for later extracting") % pypack.name) self.queue.append(pid) else: - self.manager.startThread(self.extract, [pid]) + self.extractPackage(pid) @threaded @@ -239,6 +239,7 @@ class ExtractArchive(Hook): new_files = None if new_files is None: + self.logWarning(basename(target), _("No files extracted")) success = False continue @@ -264,6 +265,12 @@ class ExtractArchive(Hook): else: self.logInfo(_("No files found to extract")) + if not matched or not success and subfolder: + try: + os.rmdir(out) + except OSError: + pass + return True if not failed else False diff --git a/module/plugins/internal/UnRar.py b/module/plugins/internal/UnRar.py index 5633b31f7..b70bf3257 100644 --- a/module/plugins/internal/UnRar.py +++ b/module/plugins/internal/UnRar.py @@ -8,7 +8,7 @@ from os.path import basename, dirname, join from string import digits from subprocess import Popen, PIPE -from module.plugins.internal.AbstractExtractor import AbtractExtractor, PasswordError, ArchiveError, CRCError +from module.plugins.internal.AbstractExtractor import AbtractExtractor, ArchiveError, CRCError, PasswordError from module.utils import save_join, decode diff --git a/module/plugins/internal/UnZip.py b/module/plugins/internal/UnZip.py index b3d54cba0..875a0ec09 100644 --- a/module/plugins/internal/UnZip.py +++ b/module/plugins/internal/UnZip.py @@ -5,7 +5,7 @@ from __future__ import with_statement import sys import zipfile -from module.plugins.internal.AbstractExtractor import AbtractExtractor, PasswordError, ArchiveError, CRCError +from module.plugins.internal.AbstractExtractor import AbtractExtractor, ArchiveError, CRCError, PasswordError class UnZip(AbtractExtractor): |