diff options
Diffstat (limited to 'pyload/plugins/internal/AbstractExtractor.py')
-rw-r--r-- | pyload/plugins/internal/AbstractExtractor.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pyload/plugins/internal/AbstractExtractor.py b/pyload/plugins/internal/AbstractExtractor.py index 5a372fd71..54ea9b348 100644 --- a/pyload/plugins/internal/AbstractExtractor.py +++ b/pyload/plugins/internal/AbstractExtractor.py @@ -13,11 +13,12 @@ class WrongPassword(Exception): class AbtractExtractor: - __name__ = "AbtractExtractor" + __name__ = "AbtractExtractor" __version__ = "0.1" __description__ = """Abtract extractor plugin""" - __authors__ = [("pyLoad Team", "admin@pyload.org")] + __license__ = "GPLv3" + __authors__ = [("pyLoad Team", "admin@pyload.org")] @staticmethod @@ -27,6 +28,7 @@ class AbtractExtractor: """ return True + @staticmethod def getTargets(files_ids): """ Filter suited targets from list of filename id tuple list @@ -35,6 +37,7 @@ class AbtractExtractor: """ raise NotImplementedError + def __init__(self, m, file, out, fullpath, overwrite, excludefiles, renice): """Initialize extractor for specific file @@ -54,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. @@ -67,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. @@ -76,6 +82,7 @@ class AbtractExtractor: """ return True + def extract(self, progress, password=None): """Extract the archive. Raise specific errors in case of failure. @@ -88,6 +95,7 @@ class AbtractExtractor: """ raise NotImplementedError + def getDeleteFiles(self): """Return list of files to delete, do *not* delete them here. @@ -95,6 +103,7 @@ class AbtractExtractor: """ raise NotImplementedError + def getExtractedFiles(self): """Populate self.files at some point while extracting""" return self.files |