diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-19 00:36:50 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-19 00:36:50 +0200 |
commit | 876673902e5ea8d5336e144cad18d23fda613e94 (patch) | |
tree | 5b6ba792882eb110e822b2e64dda2b6a4f3722e9 /module/plugins/Crypter.py | |
parent | improved hook loader (diff) | |
download | pyload-876673902e5ea8d5336e144cad18d23fda613e94.tar.xz |
cleanup
Diffstat (limited to 'module/plugins/Crypter.py')
-rw-r--r-- | module/plugins/Crypter.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/module/plugins/Crypter.py b/module/plugins/Crypter.py index 9c56eb91b..d1549fe80 100644 --- a/module/plugins/Crypter.py +++ b/module/plugins/Crypter.py @@ -19,8 +19,6 @@ from module.plugins.Plugin import Plugin -from os.path import join, exists, basename - class Crypter(Plugin): __name__ = "Crypter" __version__ = "0.1" @@ -33,15 +31,16 @@ class Crypter(Plugin): def __init__(self, pyfile): Plugin.__init__(self, pyfile) - """ Put all packages here. It's a list of tuples like: - ( name, [list of links], folder ) """ + #: Put all packages here. It's a list of tuples like: ( name, [list of links], folder ) self.packages = [] + + #: List of urls, pyLoad will generate packagenames + self.urls = [] self.multiDL = True self.limitDL = 0 - self.setup() - #---------------------------------------------------------------------- + def preprocessing(self, thread): """prepare""" self.setup() @@ -54,8 +53,7 @@ class Crypter(Plugin): def decrypt(self, pyfile): raise NotImplementedError - - #---------------------------------------------------------------------- + def createPackages(self): """ create new packages from self.packages """ for pack in self.packages: @@ -68,4 +66,7 @@ class Crypter(Plugin): if self.pyfile.package().password: self.core.api.setPackageData(pid, {"password": self.pyfile.package().password}) + + if self.urls: + self.core.api.generateAndAddPackages(self.urls) |