diff options
Diffstat (limited to 'module/plugins/internal/AbstractExtractor.py')
-rw-r--r-- | module/plugins/internal/AbstractExtractor.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/module/plugins/internal/AbstractExtractor.py b/module/plugins/internal/AbstractExtractor.py index d1d1a09cb..8a69ebb56 100644 --- a/module/plugins/internal/AbstractExtractor.py +++ b/module/plugins/internal/AbstractExtractor.py @@ -13,12 +13,12 @@ class WrongPassword(Exception): class AbtractExtractor: - __name__ = "AbtractExtractor" + __name__ = "AbtractExtractor" __version__ = "0.1" __description__ = """Abtract extractor plugin""" - __author_name__ = "pyLoad Team" - __author_mail__ = "admin@pyload.org" + __license__ = "GPLv3" + __authors__ = [("pyLoad Team", "admin@pyload.org")] @staticmethod @@ -28,6 +28,7 @@ class AbtractExtractor: """ return True + @staticmethod def getTargets(files_ids): """ Filter suited targets from list of filename id tuple list @@ -36,6 +37,7 @@ class AbtractExtractor: """ raise NotImplementedError + def __init__(self, m, file, out, fullpath, overwrite, excludefiles, renice): """Initialize extractor for specific file @@ -55,10 +57,12 @@ class AbtractExtractor: self.renice = renice self.files = [] #: Store extracted files here + def init(self): """ Initialize additional data structures """ pass + def checkArchive(self): """Check if password if needed. Raise ArchiveError if integrity is questionable. @@ -68,6 +72,7 @@ class AbtractExtractor: """ return False + def checkPassword(self, password): """ Check if the given password is/might be correct. If it can not be decided at this point return true. @@ -77,6 +82,7 @@ class AbtractExtractor: """ return True + def extract(self, progress, password=None): """Extract the archive. Raise specific errors in case of failure. @@ -89,6 +95,7 @@ class AbtractExtractor: """ raise NotImplementedError + def getDeleteFiles(self): """Return list of files to delete, do *not* delete them here. @@ -96,6 +103,7 @@ class AbtractExtractor: """ raise NotImplementedError + def getExtractedFiles(self): """Populate self.files at some point while extracting""" return self.files |