diff options
Diffstat (limited to 'module/plugins/hooks')
26 files changed, 59 insertions, 180 deletions
diff --git a/module/plugins/hooks/AndroidPhoneNotify.py b/module/plugins/hooks/AndroidPhoneNotify.py index 1cea0c994..e6ddac546 100644 --- a/module/plugins/hooks/AndroidPhoneNotify.py +++ b/module/plugins/hooks/AndroidPhoneNotify.py @@ -2,10 +2,10 @@ import time -from module.plugins.internal.Hook import Hook, Expose +from module.plugins.internal.Addon import Addon, Expose -class AndroidPhoneNotify(Hook): +class AndroidPhoneNotify(Addon): __name__ = "AndroidPhoneNotify" __type__ = "hook" __version__ = "0.10" @@ -26,12 +26,7 @@ class AndroidPhoneNotify(Hook): ("Walter Purcaro", "vuolter@gmail.com" )] - interval = 0 #@TODO: Remove in 0.4.10 - - - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - + def init(self): self.event_list = ["plugin_updated"] self.event_map = {'allDownloadsProcessed': "all_downloads_processed"} diff --git a/module/plugins/hooks/AntiVirus.py b/module/plugins/hooks/AntiVirus.py index cb9d5aaa6..8b19af84c 100644 --- a/module/plugins/hooks/AntiVirus.py +++ b/module/plugins/hooks/AntiVirus.py @@ -9,11 +9,11 @@ try: except ImportError: pass -from module.plugins.internal.Hook import Hook, Expose, threaded +from module.plugins.internal.Addon import Addon, Expose, threaded from module.utils import fs_encode, save_join as fs_join -class AntiVirus(Hook): +class AntiVirus(Addon): __name__ = "AntiVirus" __type__ = "hook" __version__ = "0.11" @@ -32,13 +32,6 @@ class AntiVirus(Hook): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - interval = 0 #@TODO: Remove in 0.4.10 - - - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - - @Expose @threaded def scan(self, pyfile, thread): diff --git a/module/plugins/hooks/BypassCaptcha.py b/module/plugins/hooks/BypassCaptcha.py index 42c30ba25..2607ac5ad 100644 --- a/module/plugins/hooks/BypassCaptcha.py +++ b/module/plugins/hooks/BypassCaptcha.py @@ -40,8 +40,6 @@ class BypassCaptcha(Hook): ("zoidberg" , "zoidberg@mujmail.cz" )] - interval = 0 #@TODO: Remove in 0.4.10 - PYLOAD_KEY = "4f771155b640970d5607f919a615bdefc67e7d32" SUBMIT_URL = "http://bypasscaptcha.com/upload.php" @@ -49,10 +47,6 @@ class BypassCaptcha(Hook): GETCREDITS_URL = "http://bypasscaptcha.com/ex_left.php" - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - - def get_credits(self): res = self.load(self.GETCREDITS_URL, post={"key": self.get_config('passkey')}) diff --git a/module/plugins/hooks/Captcha9Kw.py b/module/plugins/hooks/Captcha9Kw.py index 0ef67e54d..ec989ae51 100644 --- a/module/plugins/hooks/Captcha9Kw.py +++ b/module/plugins/hooks/Captcha9Kw.py @@ -33,15 +33,9 @@ class Captcha9Kw(Hook): ("Walter Purcaro", "vuolter@gmail.com")] - interval = 0 #@TODO: Remove in 0.4.10 - API_URL = "https://www.9kw.eu/index.cgi" - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - - def get_credits(self): res = self.load(self.API_URL, get={'apikey': self.get_config('passkey'), diff --git a/module/plugins/hooks/CaptchaBrotherhood.py b/module/plugins/hooks/CaptchaBrotherhood.py index d35bc720d..1265fc0ae 100644 --- a/module/plugins/hooks/CaptchaBrotherhood.py +++ b/module/plugins/hooks/CaptchaBrotherhood.py @@ -50,15 +50,9 @@ class CaptchaBrotherhood(Hook): ("zoidberg", "zoidberg@mujmail.cz")] - interval = 0 #@TODO: Remove in 0.4.10 - API_URL = "http://www.captchabrotherhood.com/" - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - - def get_credits(self): res = self.load(self.API_URL + "askCredits.aspx", get={"username": self.get_config('username'), "password": self.get_config('password')}) diff --git a/module/plugins/hooks/Checksum.py b/module/plugins/hooks/Checksum.py index 4d2dbf576..681816a0f 100644 --- a/module/plugins/hooks/Checksum.py +++ b/module/plugins/hooks/Checksum.py @@ -7,7 +7,7 @@ import os import re import zlib -from module.plugins.internal.Hook import Hook +from module.plugins.internal.Addon import Addon from module.utils import save_join as fs_join, fs_encode @@ -35,7 +35,7 @@ def compute_checksum(local_file, algorithm): return None -class Checksum(Hook): +class Checksum(Addon): __name__ = "Checksum" __type__ = "hook" __version__ = "0.18" @@ -53,7 +53,6 @@ class Checksum(Hook): ("stickell" , "l.stickell@yahoo.it")] - interval = 0 #@TODO: Remove in 0.4.10 methods = {'sfv' : 'crc32', 'crc' : 'crc32', 'hash': 'md5'} @@ -68,8 +67,7 @@ class Checksum(Hook): self.log_info(_("Checksum validation is disabled in plugin configuration")) - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 + def init(self): self.algorithms = sorted( getattr(hashlib, "algorithms", ("md5", "sha1", "sha224", "sha256", "sha384", "sha512")), reverse=True) diff --git a/module/plugins/hooks/ClickAndLoad.py b/module/plugins/hooks/ClickAndLoad.py index c361d51b2..61e28f469 100644 --- a/module/plugins/hooks/ClickAndLoad.py +++ b/module/plugins/hooks/ClickAndLoad.py @@ -10,7 +10,7 @@ except ImportError: from threading import Lock -from module.plugins.internal.Hook import Hook, threaded +from module.plugins.internal.Addon import Addon, threaded def forward(source, destination): @@ -26,7 +26,7 @@ def forward(source, destination): #@TODO: IPv6 support -class ClickAndLoad(Hook): +class ClickAndLoad(Addon): __name__ = "ClickAndLoad" __type__ = "hook" __version__ = "0.45" @@ -41,13 +41,6 @@ class ClickAndLoad(Hook): ("Walter Purcaro", "vuolter@gmail.com")] - interval = 0 #@TODO: Remove in 0.4.10 - - - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - - def activate(self): if not self.core.config.get("webinterface", "activated"): return diff --git a/module/plugins/hooks/DeathByCaptcha.py b/module/plugins/hooks/DeathByCaptcha.py index 43bad2d0b..6727107ca 100644 --- a/module/plugins/hooks/DeathByCaptcha.py +++ b/module/plugins/hooks/DeathByCaptcha.py @@ -63,15 +63,9 @@ class DeathByCaptcha(Hook): ("zoidberg", "zoidberg@mujmail.cz")] - interval = 0 #@TODO: Remove in 0.4.10 - API_URL = "http://api.dbcapi.me/api/" - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - - def api_response(self, api="captcha", post=False, multipart=False): req = get_request() req.c.setopt(pycurl.HTTPHEADER, ["Accept: application/json", "User-Agent: pyLoad %s" % self.core.version]) diff --git a/module/plugins/hooks/DeleteFinished.py b/module/plugins/hooks/DeleteFinished.py index 5c613f5c6..2143fe19a 100644 --- a/module/plugins/hooks/DeleteFinished.py +++ b/module/plugins/hooks/DeleteFinished.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- from module.database import style -from module.plugins.internal.Hook import Hook +from module.plugins.internal.Addon import Addon -class DeleteFinished(Hook): +class DeleteFinished(Addon): __name__ = "DeleteFinished" __type__ = "hook" __version__ = "1.14" @@ -21,8 +21,7 @@ class DeleteFinished(Hook): ## overwritten methods ## - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 + def init(self): # self.event_map = {'pluginConfigChanged': "plugin_config_changed"} self.interval = self.MIN_CHECK_INTERVAL diff --git a/module/plugins/hooks/DownloadScheduler.py b/module/plugins/hooks/DownloadScheduler.py index e1114d615..bd67dec67 100644 --- a/module/plugins/hooks/DownloadScheduler.py +++ b/module/plugins/hooks/DownloadScheduler.py @@ -3,10 +3,10 @@ import re import time -from module.plugins.internal.Hook import Hook +from module.plugins.internal.Addon import Addon -class DownloadScheduler(Hook): +class DownloadScheduler(Addon): __name__ = "DownloadScheduler" __type__ = "hook" __version__ = "0.24" @@ -20,14 +20,6 @@ class DownloadScheduler(Hook): ("stickell", "l.stickell@yahoo.it")] - interval = 0 #@TODO: Remove in 0.4.10 - - - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - self.cb = None #: Callback to scheduler job; will be by removed hookmanager when hook unloaded - - def activate(self): self.update_schedule() diff --git a/module/plugins/hooks/ExpertDecoders.py b/module/plugins/hooks/ExpertDecoders.py index 17890f691..baf880644 100644 --- a/module/plugins/hooks/ExpertDecoders.py +++ b/module/plugins/hooks/ExpertDecoders.py @@ -26,15 +26,9 @@ class ExpertDecoders(Hook): ("zoidberg", "zoidberg@mujmail.cz")] - interval = 0 #@TODO: Remove in 0.4.10 - API_URL = "http://www.fasttypers.org/imagepost.ashx" - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - - def get_credits(self): res = self.load(self.API_URL, post={"key": self.get_config('passkey'), "action": "balance"}) diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py index 6bf3cf347..2a96d9e59 100644 --- a/module/plugins/hooks/ExternalScripts.py +++ b/module/plugins/hooks/ExternalScripts.py @@ -3,11 +3,11 @@ import os import subprocess -from module.plugins.internal.Hook import Hook +from module.plugins.internal.Addon import Addon from module.utils import fs_encode, save_join as fs_join -class ExternalScripts(Hook): +class ExternalScripts(Addon): __name__ = "ExternalScripts" __type__ = "hook" __version__ = "0.43" @@ -23,11 +23,8 @@ class ExternalScripts(Hook): ("Walter Purcaro", "vuolter@gmail.com")] - interval = 0 #@TODO: Remove in 0.4.10 - - - def setup(self): - self.info = {'oldip': None} + def init(self): + self.info['oldip'] = None self.scripts = {} self.event_list = ["archive_extract_failed", "archive_extracted" , diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index ad9f67a1a..cead3595c 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -55,7 +55,7 @@ if os.name != "nt": from grp import getgrnam from pwd import getpwnam -from module.plugins.internal.Hook import Hook, Expose, threaded +from module.plugins.internal.Addon import Addon, Expose, threaded from module.plugins.internal.Plugin import replace_patterns from module.plugins.internal.Extractor import ArchiveError, CRCError, PasswordError from module.utils import fs_encode, save_join as fs_join, uniqify @@ -109,7 +109,7 @@ class ArchiveQueue(object): return self.set(queue) -class ExtractArchive(Hook): +class ExtractArchive(Addon): __name__ = "ExtractArchive" __type__ = "hook" __version__ = "1.46" @@ -141,8 +141,7 @@ class ExtractArchive(Hook): NAME_REPLACEMENTS = [(r'\.part\d+\.rar$', ".part.rar")] - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 + def init(self): self.event_map = {'allDownloadsProcessed': "all_downloads_processed", 'packageDeleted' : "package_deleted" } diff --git a/module/plugins/hooks/HotFolder.py b/module/plugins/hooks/HotFolder.py index 8e1d1c54f..b98f325fa 100644 --- a/module/plugins/hooks/HotFolder.py +++ b/module/plugins/hooks/HotFolder.py @@ -7,11 +7,11 @@ import time from shutil import move -from module.plugins.internal.Hook import Hook +from module.plugins.internal.Addon import Addon from module.utils import fs_encode, save_join as fs_join -class HotFolder(Hook): +class HotFolder(Addon): __name__ = "HotFolder" __type__ = "hook" __version__ = "0.16" @@ -26,8 +26,7 @@ class HotFolder(Hook): __authors__ = [("RaNaN", "RaNaN@pyload.de")] - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 + def init(self): self.interval = 30 diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 5d8376b4e..e31435e96 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -11,11 +11,11 @@ from select import select from threading import Thread from module.Api import PackageDoesNotExists, FileDoesNotExists -from module.plugins.internal.Hook import Hook +from module.plugins.internal.Addon import Addon from module.utils import formatSize -class IRCInterface(Thread, Hook): +class IRCInterface(Thread, Addon): __name__ = "IRCInterface" __type__ = "hook" __version__ = "0.15" @@ -36,12 +36,9 @@ class IRCInterface(Thread, Hook): __authors__ = [("Jeix", "Jeix@hasnomail.com")] - interval = 0 #@TODO: Remove in 0.4.10 - - def __init__(self, core, manager): Thread.__init__(self) - Hook.__init__(self, core, manager) + Addon.__init__(self, core, manager) self.set_daemon(True) diff --git a/module/plugins/hooks/ImageTyperz.py b/module/plugins/hooks/ImageTyperz.py index b46728a0d..2e4cae903 100644 --- a/module/plugins/hooks/ImageTyperz.py +++ b/module/plugins/hooks/ImageTyperz.py @@ -44,17 +44,11 @@ class ImageTyperz(Hook): ("zoidberg", "zoidberg@mujmail.cz")] - interval = 0 #@TODO: Remove in 0.4.10 - SUBMIT_URL = "http://captchatypers.com/Forms/UploadFileAndGetTextNEW.ashx" RESPOND_URL = "http://captchatypers.com/Forms/SetBadImage.ashx" GETCREDITS_URL = "http://captchatypers.com/Forms/RequestBalance.ashx" - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - - def get_credits(self): res = self.load(self.GETCREDITS_URL, post={'action': "REQUESTBALANCE", diff --git a/module/plugins/hooks/JustPremium.py b/module/plugins/hooks/JustPremium.py index 706de4d81..b30625e9a 100644 --- a/module/plugins/hooks/JustPremium.py +++ b/module/plugins/hooks/JustPremium.py @@ -2,10 +2,10 @@ import re -from module.plugins.internal.Hook import Hook +from module.plugins.internal.Addon import Addon -class JustPremium(Hook): +class JustPremium(Addon): __name__ = "JustPremium" __type__ = "hook" __version__ = "0.24" @@ -20,11 +20,7 @@ class JustPremium(Hook): ("immenz" , "immenz@gmx.net" )] - interval = 0 #@TODO: Remove in 0.4.10 - - - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 + def init(self): self.event_map = {'linksAdded': "links_added"} diff --git a/module/plugins/hooks/MergeFiles.py b/module/plugins/hooks/MergeFiles.py index 9aa70aa71..b5245cc14 100644 --- a/module/plugins/hooks/MergeFiles.py +++ b/module/plugins/hooks/MergeFiles.py @@ -6,11 +6,11 @@ import os import re import traceback -from module.plugins.internal.Hook import Hook, threaded +from module.plugins.internal.Addon import Addon, threaded from module.utils import save_join as fs_join -class MergeFiles(Hook): +class MergeFiles(Addon): __name__ = "MergeFiles" __type__ = "hook" __version__ = "0.16" @@ -22,15 +22,9 @@ class MergeFiles(Hook): __authors__ = [("and9000", "me@has-no-mail.com")] - interval = 0 #@TODO: Remove in 0.4.10 - BUFFER_SIZE = 4096 - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - - @threaded def package_finished(self, pack): files = {} diff --git a/module/plugins/hooks/MultiHome.py b/module/plugins/hooks/MultiHome.py index 7e4b5e583..bfb420aea 100644 --- a/module/plugins/hooks/MultiHome.py +++ b/module/plugins/hooks/MultiHome.py @@ -2,10 +2,10 @@ import time -from module.plugins.internal.Hook import Hook +from module.plugins.internal.Addon import Addon -class MultiHome(Hook): +class MultiHome(Addon): __name__ = "MultiHome" __type__ = "hook" __version__ = "0.14" @@ -17,11 +17,7 @@ class MultiHome(Hook): __authors__ = [("mkaay", "mkaay@mkaay.de")] - interval = 0 #@TODO: Remove in 0.4.10 - - - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 + def init(self): self.register = {} self.interfaces = [] diff --git a/module/plugins/hooks/RestartFailed.py b/module/plugins/hooks/RestartFailed.py index 52752861f..8740ccd7d 100644 --- a/module/plugins/hooks/RestartFailed.py +++ b/module/plugins/hooks/RestartFailed.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -from module.plugins.internal.Hook import Hook +from module.plugins.internal.Addon import Addon -class RestartFailed(Hook): +class RestartFailed(Addon): __name__ = "RestartFailed" __type__ = "hook" __version__ = "1.60" @@ -34,8 +34,7 @@ class RestartFailed(Hook): self.core.api.restartFailed() - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 + def init(self): # self.event_map = {'pluginConfigChanged': "plugin_config_changed"} self.interval = self.MIN_CHECK_INTERVAL diff --git a/module/plugins/hooks/SkipRev.py b/module/plugins/hooks/SkipRev.py index 5ec6290ac..2123a6543 100644 --- a/module/plugins/hooks/SkipRev.py +++ b/module/plugins/hooks/SkipRev.py @@ -7,13 +7,13 @@ import urlparse from types import MethodType from module.PyFile import PyFile -from module.plugins.internal.Hook import Hook +from module.plugins.internal.Addon import Addon -class SkipRev(Hook): +class SkipRev(Addon): __name__ = "SkipRev" __type__ = "hook" - __version__ = "0.32" + __version__ = "0.33" __config__ = [("mode" , "Auto;Manual", "Choose recovery archives to skip" , "Auto"), ("revtokeep", "int" , "Number of recovery archives to keep for package", 0 )] @@ -23,26 +23,15 @@ class SkipRev(Hook): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - interval = 0 #@TODO: Remove in 0.4.10 - - - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - - @staticmethod - def _setup(self): - self.pyfile.plugin._setup() + def _init(self): + self.pyfile.plugin._init() if self.pyfile.hasStatus("skipped"): self.skip(self.pyfile.statusname or self.pyfile.pluginname) def _name(self, pyfile): - if hasattr(pyfile.pluginmodule, "getInfo"): #@NOTE: getInfo is deprecated in 0.4.10 - return pyfile.pluginmodule.get_info([pyfile.url]).next()[0] - else: - self.log_warning(_("Unable to grab file name")) - return urlparse.urlparse(urllib.unquote(pyfile.url)).path.split('/')[-1] + return pyfile.pluginclass.get_info(pyfile.url)['name'] def _pyfile(self, link): @@ -78,10 +67,10 @@ class SkipRev(Hook): pyfile.setCustomStatus("SkipRev", "skipped") - if not hasattr(pyfile.plugin, "_setup"): + if not hasattr(pyfile.plugin, "_init"): #: Work-around: inject status checker inside the preprocessing routine of the plugin - pyfile.plugin._setup = pyfile.plugin.setup - pyfile.plugin.setup = MethodType(self._setup, pyfile.plugin) + pyfile.plugin._init = pyfile.plugin.init + pyfile.plugin.init = MethodType(self._init, pyfile.plugin) def download_failed(self, pyfile): diff --git a/module/plugins/hooks/UnSkipOnFail.py b/module/plugins/hooks/UnSkipOnFail.py index 5507cd20f..c8e58294c 100644 --- a/module/plugins/hooks/UnSkipOnFail.py +++ b/module/plugins/hooks/UnSkipOnFail.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- from module.PyFile import PyFile -from module.plugins.internal.Hook import Hook +from module.plugins.internal.Addon import Addon -class UnSkipOnFail(Hook): +class UnSkipOnFail(Addon): __name__ = "UnSkipOnFail" __type__ = "hook" __version__ = "0.09" @@ -16,13 +16,6 @@ class UnSkipOnFail(Hook): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - interval = 0 #@TODO: Remove in 0.4.10 - - - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - - def download_failed(self, pyfile): #: Check if pyfile is still "failed", maybe might has been restarted in meantime if pyfile.status != 8: diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py index 6f6ad9838..4ec981ac0 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -9,7 +9,7 @@ import time from operator import itemgetter -from module.plugins.internal.Hook import Expose, Hook, threaded +from module.plugins.internal.Addon import Expose, Addon, threaded from module.utils import save_join as fs_join @@ -25,7 +25,7 @@ def exists(path): return False -class UpdateManager(Hook): +class UpdateManager(Addon): __name__ = "UpdateManager" __type__ = "hook" __version__ = "0.54" @@ -59,7 +59,7 @@ class UpdateManager(Hook): self.init_periodical() - def setup(self): + def init(self): self.info = {'pyload': False, 'version': None, 'plugins': False, 'last_check': time.time()} self.mtimes = {} #: Store modification time for each plugin diff --git a/module/plugins/hooks/UserAgentSwitcher.py b/module/plugins/hooks/UserAgentSwitcher.py index fdfe4b673..637f6c3ad 100644 --- a/module/plugins/hooks/UserAgentSwitcher.py +++ b/module/plugins/hooks/UserAgentSwitcher.py @@ -2,10 +2,10 @@ import pycurl -from module.plugins.internal.Hook import Hook +from module.plugins.internal.Addon import Addon -class UserAgentSwitcher(Hook): +class UserAgentSwitcher(Addon): __name__ = "UserAgentSwitcher" __type__ = "hook" __version__ = "0.10" @@ -20,13 +20,6 @@ class UserAgentSwitcher(Hook): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - interval = 0 #@TODO: Remove in 0.4.10 - - - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - - def download_preparing(self, pyfile): connecttimeout = self.get_config('connecttimeout') maxredirs = self.get_config('maxredirs') diff --git a/module/plugins/hooks/WindowsPhoneNotify.py b/module/plugins/hooks/WindowsPhoneNotify.py index 511b4b568..b4b4d2658 100644 --- a/module/plugins/hooks/WindowsPhoneNotify.py +++ b/module/plugins/hooks/WindowsPhoneNotify.py @@ -3,10 +3,10 @@ import httplib import time -from module.plugins.internal.Hook import Hook, Expose +from module.plugins.internal.Addon import Addon, Expose -class WindowsPhoneNotify(Hook): +class WindowsPhoneNotify(Addon): __name__ = "WindowsPhoneNotify" __type__ = "hook" __version__ = "0.12" @@ -28,12 +28,7 @@ class WindowsPhoneNotify(Hook): ("Walter Purcaro", "vuolter@gmail.com" )] - interval = 0 #@TODO: Remove in 0.4.10 - - - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 - + def init(self): self.event_list = ["plugin_updated"] self.event_map = {'allDownloadsProcessed': "all_downloads_processed"} diff --git a/module/plugins/hooks/XFileSharingPro.py b/module/plugins/hooks/XFileSharingPro.py index 45acc9976..5829378d8 100644 --- a/module/plugins/hooks/XFileSharingPro.py +++ b/module/plugins/hooks/XFileSharingPro.py @@ -22,7 +22,6 @@ class XFileSharingPro(Hook): __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - interval = 0 #@TODO: Remove in 0.4.10 regexp = {'hoster' : (r'https?://(?:www\.)?(?:\w+\.)*?(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:embed-)?\w{12}(?:\W|$)', r'https?://(?:[^/]+\.)?(?P<DOMAIN>%s)/(?:embed-)?\w+'), 'crypter': (r'https?://(?:www\.)?(?:\w+\.)*?(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:user|folder)s?/\w+', @@ -48,8 +47,7 @@ class XFileSharingPro(Hook): # self.load_pattern() - def setup(self): - self.info = {} #@TODO: Remove in 0.4.10 + def init(self): # self.event_map = {'pluginConfigChanged': "plugin_config_changed"} |