diff options
Diffstat (limited to 'module/plugins/hooks/ExtractArchive.py')
-rw-r--r-- | module/plugins/hooks/ExtractArchive.py | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index 73782ed95..9ca7bf854 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -162,7 +162,7 @@ class ExtractArchive(Hook): try: module = self.core.pluginManager.loadModule("internal", p) klass = getattr(module, p) - if klass.isUsable(): + if klass.is_usable(): self.extractors.append(klass) if klass.REPAIR: self.repair = self.get_config('repair') @@ -210,6 +210,15 @@ class ExtractArchive(Hook): self.extracting = False + #: Deprecated method, use `extract_package` instead + @Expose + def extractPackage(self, *args, **kwargs): + """ + See `extract_package` + """ + return self.extract_package(*args, **kwargs) + + @Expose def extract_package(self, *ids): """ @@ -301,7 +310,7 @@ class ExtractArchive(Hook): if filter(lambda ext: fname.lower().endswith(ext), extensions)] for Extractor in self.extractors: - targets = Extractor.getTargets(files_ids) + targets = Extractor.get_targets(files_ids) if targets: self.log_debug("Targets for %s: %s" % (Extractor.__name__, targets)) matched = True @@ -513,6 +522,15 @@ class ExtractArchive(Hook): raise Exception(_("Extract failed")) + #: Deprecated method, use `get_passwords` instead + @Expose + def getPasswords(self, *args, **kwargs): + """ + See `get_passwords` + """ + return self.get_passwords(*args, **kwargs) + + @Expose def get_passwords(self, reload=True): """ @@ -540,6 +558,15 @@ class ExtractArchive(Hook): self.passwords = passwords + #: Deprecated method, use `add_password` instead + @Expose + def addPassword(self, *args, **kwargs): + """ + See `add_password` + """ + return self.add_password(*args, **kwargs) + + @Expose def add_password(self, password): """ |