diff options
Diffstat (limited to 'module/plugins/internal')
-rw-r--r-- | module/plugins/internal/Account.py | 6 | ||||
-rw-r--r-- | module/plugins/internal/Captcha.py | 4 | ||||
-rw-r--r-- | module/plugins/internal/Container.py | 22 | ||||
-rw-r--r-- | module/plugins/internal/Crypter.py | 24 | ||||
-rw-r--r-- | module/plugins/internal/DeadCrypter.py | 4 | ||||
-rw-r--r-- | module/plugins/internal/DeadHoster.py | 4 | ||||
-rw-r--r-- | module/plugins/internal/Hook.py | 24 | ||||
-rw-r--r-- | module/plugins/internal/Hoster.py | 6 | ||||
-rw-r--r-- | module/plugins/internal/MultiHook.py | 4 | ||||
-rw-r--r-- | module/plugins/internal/MultiHoster.py | 4 | ||||
-rw-r--r-- | module/plugins/internal/Plugin.py | 8 | ||||
-rw-r--r-- | module/plugins/internal/SimpleCrypter.py | 4 | ||||
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 6 | ||||
-rw-r--r-- | module/plugins/internal/SolveMedia.py | 4 | ||||
-rw-r--r-- | module/plugins/internal/XFSAccount.py | 4 |
15 files changed, 64 insertions, 64 deletions
diff --git a/module/plugins/internal/Account.py b/module/plugins/internal/Account.py index c147404e0..7632d15c2 100644 --- a/module/plugins/internal/Account.py +++ b/module/plugins/internal/Account.py @@ -13,7 +13,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. - + @author: mkaay """ @@ -36,7 +36,7 @@ class Account(Base): associated hoster plugin. Plugin should also provide `loadAccountInfo` """ __name__ = "Account" - __version__ = "0.2" + __version__ = "0.02" __type__ = "account" __description__ = """Account Plugin""" __author_name__ = ("mkaay") @@ -76,7 +76,7 @@ class Account(Base): def _login(self, user, data): # set timestamp for login self.timestamps[user] = time() - + req = self.getAccountRequest(user) try: self.login(user, data, req) diff --git a/module/plugins/internal/Captcha.py b/module/plugins/internal/Captcha.py index b4af46493..e5a44d750 100644 --- a/module/plugins/internal/Captcha.py +++ b/module/plugins/internal/Captcha.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- -from module.plugins.Plugin import Base +from module.plugins.internal.Plugin import Base #@TODO: Extend (new) Plugin class; remove all `html` args class Captcha(Base): __name__ = "Captcha" __type__ = "captcha" - __version__ = "0.29" + __version__ = "0.30" __description__ = """Base captcha service plugin""" __license__ = "GPLv3" diff --git a/module/plugins/internal/Container.py b/module/plugins/internal/Container.py index c233d3710..43ca95e77 100644 --- a/module/plugins/internal/Container.py +++ b/module/plugins/internal/Container.py @@ -13,11 +13,11 @@ You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. - + @author: mkaay """ -from module.plugins.Crypter import Crypter +from module.plugins.internal.Crypter import Crypter from os.path import join, exists, basename from os import remove @@ -25,7 +25,7 @@ import re class Container(Crypter): __name__ = "Container" - __version__ = "0.1" + __version__ = "0.02" __pattern__ = None __type__ = "container" __description__ = """Base container plugin""" @@ -38,19 +38,19 @@ class Container(Crypter): self.setup() self.thread = thread - + self.loadToDisk() self.decrypt(self.pyfile) self.deleteTmp() - + self.createPackages() - + def loadToDisk(self): - """loads container to disk if its stored remotely and overwrite url, + """loads container to disk if its stored remotely and overwrite url, or check existent on several places at disk""" - + if self.pyfile.url.startswith("http"): self.pyfile.name = re.findall("([^\/=]+)", self.pyfile.url)[-1] content = self.load(self.pyfile.url) @@ -58,7 +58,7 @@ class Container(Crypter): f = open(self.pyfile.url, "wb" ) f.write(content) f.close() - + else: self.pyfile.name = basename(self.pyfile.url) if not exists(self.pyfile.url): @@ -66,10 +66,10 @@ class Container(Crypter): self.pyfile.url = join(pypath, self.pyfile.url) else: self.fail(_("File not exists.")) - + def deleteTmp(self): if self.pyfile.name.startswith("tmp_"): remove(self.pyfile.url) - + diff --git a/module/plugins/internal/Crypter.py b/module/plugins/internal/Crypter.py index d1549fe80..b87ed1882 100644 --- a/module/plugins/internal/Crypter.py +++ b/module/plugins/internal/Crypter.py @@ -13,33 +13,33 @@ You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. - + @author: mkaay """ -from module.plugins.Plugin import Plugin +from module.plugins.internal.Plugin import Plugin class Crypter(Plugin): __name__ = "Crypter" - __version__ = "0.1" + __version__ = "0.02" __pattern__ = None __type__ = "container" __description__ = """Base crypter plugin""" __author_name__ = ("mkaay") __author_mail__ = ("mkaay@mkaay.de") - + def __init__(self, pyfile): Plugin.__init__(self, pyfile) - + #: 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 - + def preprocessing(self, thread): """prepare""" @@ -47,9 +47,9 @@ class Crypter(Plugin): self.thread = thread self.decrypt(self.pyfile) - + self.createPackages() - + def decrypt(self, pyfile): raise NotImplementedError @@ -59,9 +59,9 @@ class Crypter(Plugin): for pack in self.packages: self.log.debug("Parsed package %(name)s with %(len)d links" % { "name" : pack[0], "len" : len(pack[1]) } ) - + links = [x.decode("utf-8") for x in pack[1]] - + pid = self.core.api.addPackage(pack[0], links, self.pyfile.package().queue) if self.pyfile.package().password: @@ -69,4 +69,4 @@ class Crypter(Plugin): if self.urls: self.core.api.generateAndAddPackages(self.urls) - + diff --git a/module/plugins/internal/DeadCrypter.py b/module/plugins/internal/DeadCrypter.py index a12399501..28ead4c23 100644 --- a/module/plugins/internal/DeadCrypter.py +++ b/module/plugins/internal/DeadCrypter.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- +from module.plugins.internal.Crypter import Crypter from module.plugins.internal.SimpleCrypter import create_getInfo -from module.plugins.Crypter import Crypter class DeadCrypter(Crypter): __name__ = "DeadCrypter" __type__ = "crypter" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'^unmatchable$' diff --git a/module/plugins/internal/DeadHoster.py b/module/plugins/internal/DeadHoster.py index 22825e87b..6dc860eea 100644 --- a/module/plugins/internal/DeadHoster.py +++ b/module/plugins/internal/DeadHoster.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- +from module.plugins.internal.Hoster import Hoster from module.plugins.internal.SimpleHoster import create_getInfo -from module.plugins.Hoster import Hoster class DeadHoster(Hoster): __name__ = "DeadHoster" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __pattern__ = r'^unmatchable$' diff --git a/module/plugins/internal/Hook.py b/module/plugins/internal/Hook.py index 5efd08bae..5f2639dce 100644 --- a/module/plugins/internal/Hook.py +++ b/module/plugins/internal/Hook.py @@ -13,7 +13,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. - + @author: mkaay @interface-version: 0.2 """ @@ -39,7 +39,7 @@ class Hook(Base): Base class for hook plugins. """ __name__ = "Hook" - __version__ = "0.2" + __version__ = "0.02" __type__ = "hook" __threaded__ = [] __config__ = [ ("name", "type", "desc" , "default") ] @@ -108,7 +108,7 @@ class Hook(Base): def __repr__(self): return "<Hook %s>" % self.__name__ - + def setup(self): """ more init stuff if needed """ pass @@ -116,37 +116,37 @@ class Hook(Base): def unload(self): """ called when hook was deactivated """ pass - + def isActivated(self): """ checks if hook is activated""" return self.config.getPlugin(self.__name__, "activated") - - #event methods - overwrite these if needed + + #event methods - overwrite these if needed def coreReady(self): pass def coreExiting(self): pass - + def downloadPreparing(self, pyfile): pass - + def downloadFinished(self, pyfile): pass - + def downloadFailed(self, pyfile): pass - + def packageFinished(self, pypack): pass def beforeReconnecting(self, ip): pass - + def afterReconnecting(self, ip): pass - + def periodical(self): pass diff --git a/module/plugins/internal/Hoster.py b/module/plugins/internal/Hoster.py index 814a70949..3fed8a7c6 100644 --- a/module/plugins/internal/Hoster.py +++ b/module/plugins/internal/Hoster.py @@ -13,11 +13,11 @@ You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. - + @author: mkaay """ -from module.plugins.Plugin import Plugin +from module.plugins.internal.Plugin import Plugin def getInfo(self): #result = [ .. (name, size, status, url) .. ] @@ -25,7 +25,7 @@ def getInfo(self): class Hoster(Plugin): __name__ = "Hoster" - __version__ = "0.1" + __version__ = "0.02" __pattern__ = None __type__ = "hoster" __description__ = """Base hoster plugin""" diff --git a/module/plugins/internal/MultiHook.py b/module/plugins/internal/MultiHook.py index 01ff4b07d..4a2c6654b 100644 --- a/module/plugins/internal/MultiHook.py +++ b/module/plugins/internal/MultiHook.py @@ -4,14 +4,14 @@ import re import time import traceback -from module.plugins.Hook import Hook +from module.plugins.internal.Hook import Hook from module.utils import decode, remove_chars class MultiHook(Hook): __name__ = "MultiHook" __type__ = "hook" - __version__ = "0.45" + __version__ = "0.46" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py index ff4414034..2b4ceb9b0 100644 --- a/module/plugins/internal/MultiHoster.py +++ b/module/plugins/internal/MultiHoster.py @@ -2,14 +2,14 @@ import re -from module.plugins.Plugin import Fail, Retry +from module.plugins.internal.Plugin import Fail, Retry from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, replace_patterns, set_cookies class MultiHoster(SimpleHoster): __name__ = "MultiHoster" __type__ = "hoster" - __version__ = "0.40" + __version__ = "0.41" __pattern__ = r'^unmatchable$' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py index 15bf3971f..e1de48f72 100644 --- a/module/plugins/internal/Plugin.py +++ b/module/plugins/internal/Plugin.py @@ -142,7 +142,7 @@ class Plugin(Base): Overwrite `process` / `decrypt` in your subclassed plugin. """ __name__ = "Plugin" - __version__ = "0.4" + __version__ = "0.04" __pattern__ = None __type__ = "hoster" __config__ = [("name", "type", "desc", "default")] @@ -263,7 +263,7 @@ class Plugin(Base): def setWait(self, seconds, reconnect=False): """Set a specific wait time later used with `wait` - + :param seconds: wait time in seconds :param reconnect: True if a reconnect would avoid wait time """ @@ -339,7 +339,7 @@ class Plugin(Base): :param result_type: 'textual' if text is written on the captcha\ or 'positional' for captcha where the user have to click\ on a specific region on the captcha - + :return: result of decrypting """ @@ -528,7 +528,7 @@ class Plugin(Base): def checkDownload(self, rules, api_size=0, max_size=50000, delete=True, read_size=0): """ checks the content of the last downloaded file, re match is saved to `lastCheck` - + :param rules: dict with names and rules to match (compiled regexp or strings) :param api_size: expected file size :param max_size: if the file is larger then it wont be checked diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index 81f977e57..6279be1bd 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -3,7 +3,7 @@ import re import urlparse -from module.plugins.Crypter import Crypter +from module.plugins.internal.Crypter import Crypter from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, replace_patterns, set_cookies from module.utils import fixup, html_unescape @@ -11,7 +11,7 @@ from module.utils import fixup, html_unescape class SimpleCrypter(Crypter, SimpleHoster): __name__ = "SimpleCrypter" __type__ = "crypter" - __version__ = "0.49" + __version__ = "0.50" __pattern__ = r'^unmatchable$' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), #: Overrides core.config['general']['folder_per_package'] diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index a369559ca..da477ad79 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -12,8 +12,8 @@ from module.PyFile import statusMap as _statusMap from module.network.CookieJar import CookieJar from module.network.HTTPRequest import BadHeader from module.network.RequestFactory import getURL -from module.plugins.Hoster import Hoster -from module.plugins.Plugin import Fail, Retry +from module.plugins.internal.Hoster import Hoster +from module.plugins.internal.Plugin import Fail, Retry from module.utils import fixup, fs_encode, html_unescape, parseFileSize @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.55" + __version__ = "1.56" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), diff --git a/module/plugins/internal/SolveMedia.py b/module/plugins/internal/SolveMedia.py index 7f5de51e1..d600ef03c 100644 --- a/module/plugins/internal/SolveMedia.py +++ b/module/plugins/internal/SolveMedia.py @@ -2,14 +2,14 @@ import re -from module.plugins.Plugin import Fail +from module.plugins.internal.Plugin import Fail from module.plugins.internal.Captcha import Captcha class SolveMedia(Captcha): __name__ = "SolveMedia" __type__ = "captcha" - __version__ = "0.13" + __version__ = "0.14" __description__ = """SolveMedia captcha service plugin""" __license__ = "GPLv3" diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py index e619cb038..f230cedf3 100644 --- a/module/plugins/internal/XFSAccount.py +++ b/module/plugins/internal/XFSAccount.py @@ -4,14 +4,14 @@ import re import time import urlparse -from module.plugins.Account import Account +from module.plugins.internal.Account import Account from module.plugins.internal.SimpleHoster import parseHtmlForm, set_cookies class XFSAccount(Account): __name__ = "XFSAccount" __type__ = "account" - __version__ = "0.37" + __version__ = "0.38" __description__ = """XFileSharing account plugin""" __license__ = "GPLv3" |