diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-14 02:23:37 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-15 16:13:41 +0200 |
commit | 48c0c42fd6faffc56432d5f037cd575979f180cc (patch) | |
tree | b8a57137e10e201f77328dca45e2951ece123e53 /module/plugins/hooks | |
parent | [l18n] Improved few source strings (diff) | |
download | pyload-48c0c42fd6faffc56432d5f037cd575979f180cc.tar.xz |
Removed all @author flags + key attributes cleanup for internal & hooks plugins
Diffstat (limited to 'module/plugins/hooks')
43 files changed, 174 insertions, 85 deletions
diff --git a/module/plugins/hooks/AlldebridCom.py b/module/plugins/hooks/AlldebridCom.py index 0f8d3bfbb..1ef9b252a 100644 --- a/module/plugins/hooks/AlldebridCom.py +++ b/module/plugins/hooks/AlldebridCom.py @@ -22,6 +22,7 @@ class AlldebridCom(MultiHoster): __author_name__ = "Andy Voigt" __author_mail__ = "spamsales@online.de" + def getHoster(self): https = "https" if self.getConfig("https") else "http" page = getURL(https + "://www.alldebrid.com/api.php?action=get_host").replace("\"", "").strip() diff --git a/module/plugins/hooks/BypassCaptcha.py b/module/plugins/hooks/BypassCaptcha.py index 70e60f56c..1c9c4e722 100644 --- a/module/plugins/hooks/BypassCaptcha.py +++ b/module/plugins/hooks/BypassCaptcha.py @@ -13,8 +13,6 @@ 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: RaNaN, Godofdream, zoidberg """ from thread import start_new_thread @@ -45,10 +43,13 @@ class BypassCaptchaException(Exception): class BypassCaptcha(Hook): __name__ = "BypassCaptcha" __version__ = "0.04" - __description__ = """Send captchas to BypassCaptcha.com""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("force", "bool", "Force BC even if client is connected", False), ("passkey", "password", "Passkey", "")] + + __description__ = """Send captchas to BypassCaptcha.com""" __author_name__ = ("RaNaN", "Godofdream", "zoidberg") __author_mail__ = ("RaNaN@pyload.org", "soilfcition@gmail.com", "zoidberg@mujmail.cz") @@ -56,6 +57,7 @@ class BypassCaptcha(Hook): RESPOND_URL = "http://bypasscaptcha.com/check_value.php" GETCREDITS_URL = "http://bypasscaptcha.com/ex_left.php" + def setup(self): self.info = {} diff --git a/module/plugins/hooks/Captcha9kw.py b/module/plugins/hooks/Captcha9kw.py index c86f92972..28bce3d2b 100755 --- a/module/plugins/hooks/Captcha9kw.py +++ b/module/plugins/hooks/Captcha9kw.py @@ -13,8 +13,6 @@ 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, RaNaN, zoidberg """ from __future__ import with_statement @@ -31,7 +29,8 @@ from module.plugins.Hook import Hook class Captcha9kw(Hook): __name__ = "Captcha9kw" __version__ = "0.09" - __description__ = """Send captchas to 9kw.eu""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("force", "bool", "Force CT even if client is connected", True), ("https", "bool", "Enable HTTPS", False), @@ -43,11 +42,14 @@ class Captcha9kw(Hook): False), ("timeout", "int", "Timeout (max. 300)", 300), ("passkey", "password", "API key", "")] + + __description__ = """Send captchas to 9kw.eu""" __author_name__ = "RaNaN" __author_mail__ = "RaNaN@pyload.org" API_URL = "://www.9kw.eu/index.cgi" + def setup(self): self.API_URL = "https" + self.API_URL if self.getConfig("https") else "http" + self.API_URL self.info = {} diff --git a/module/plugins/hooks/CaptchaBrotherhood.py b/module/plugins/hooks/CaptchaBrotherhood.py index 23d71ff5f..86768b76b 100644 --- a/module/plugins/hooks/CaptchaBrotherhood.py +++ b/module/plugins/hooks/CaptchaBrotherhood.py @@ -13,8 +13,6 @@ 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, RaNaN, zoidberg """ from __future__ import with_statement @@ -47,16 +45,20 @@ class CaptchaBrotherhoodException(Exception): class CaptchaBrotherhood(Hook): __name__ = "CaptchaBrotherhood" __version__ = "0.05" - __description__ = """Send captchas to CaptchaBrotherhood.com""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("username", "str", "Username", ""), ("force", "bool", "Force CT even if client is connected", False), ("passkey", "password", "Password", "")] + + __description__ = """Send captchas to CaptchaBrotherhood.com""" __author_name__ = ("RaNaN", "zoidberg") __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz") API_URL = "http://www.captchabrotherhood.com/" + def setup(self): self.info = {} diff --git a/module/plugins/hooks/Checksum.py b/module/plugins/hooks/Checksum.py index af37d69e6..8566a847e 100644 --- a/module/plugins/hooks/Checksum.py +++ b/module/plugins/hooks/Checksum.py @@ -13,8 +13,6 @@ 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: zoidberg """ from __future__ import with_statement @@ -55,12 +53,15 @@ def computeChecksum(local_file, algorithm): class Checksum(Hook): __name__ = "Checksum" __version__ = "0.12" - __description__ = """Verify downloaded file size and checksum""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("check_action", "fail;retry;nothing", "What to do if check fails?", "retry"), ("max_tries", "int", "Number of retries", 2), ("retry_action", "fail;nothing", "What to do if all retries fail?", "fail"), ("wait_time", "int", "Time to wait before each retry (seconds)", 1)] + + __description__ = """Verify downloaded file size and checksum""" __author_name__ = ("zoidberg", "Walter Purcaro") __author_mail__ = ("zoidberg@mujmail.cz", "vuolter@gmail.com") @@ -70,6 +71,7 @@ class Checksum(Hook): 'crc': r'filename=(?P<name>.+)\nsize=(?P<size>\d+)\ncrc32=(?P<hash>[0-9A-Fa-f]{8})$', 'default': r'^(?P<hash>[0-9A-Fa-f]+)\s+\*?(?P<name>.+)$'} + def coreReady(self): if not self.config['general']['checksum']: self.logInfo("Checksum validation is disabled in general configuration") diff --git a/module/plugins/hooks/ClickAndLoad.py b/module/plugins/hooks/ClickAndLoad.py index 002fd4cd7..3c47d30ce 100644 --- a/module/plugins/hooks/ClickAndLoad.py +++ b/module/plugins/hooks/ClickAndLoad.py @@ -13,9 +13,6 @@ 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: RaNaN - @interface-version: 0.2 """ import socket @@ -27,12 +24,16 @@ from module.plugins.Hook import Hook class ClickAndLoad(Hook): __name__ = "ClickAndLoad" __version__ = "0.22" - __description__ = """Gives abillity to use jd's click and load. depends on webinterface""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", True), ("extern", "bool", "Allow external link adding", False)] + + __description__ = """Gives abillity to use jd's click and load. depends on webinterface""" __author_name__ = ("RaNaN", "mkaay") __author_mail__ = ("RaNaN@pyload.de", "mkaay@mkaay.de") + def coreReady(self): self.port = int(self.config['webinterface']['port']) if self.config['webinterface']['activated']: diff --git a/module/plugins/hooks/DeathByCaptcha.py b/module/plugins/hooks/DeathByCaptcha.py index f7bc1b90f..5a5ab7933 100644 --- a/module/plugins/hooks/DeathByCaptcha.py +++ b/module/plugins/hooks/DeathByCaptcha.py @@ -13,8 +13,6 @@ 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, RaNaN, zoidberg """ from __future__ import with_statement @@ -62,16 +60,20 @@ class DeathByCaptchaException(Exception): class DeathByCaptcha(Hook): __name__ = "DeathByCaptcha" __version__ = "0.03" - __description__ = """Send captchas to DeathByCaptcha.com""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("username", "str", "Username", ""), ("passkey", "password", "Password", ""), ("force", "bool", "Force DBC even if client is connected", False)] + + __description__ = """Send captchas to DeathByCaptcha.com""" __author_name__ = ("RaNaN", "zoidberg") __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz") API_URL = "http://api.dbcapi.me/api/" + def setup(self): self.info = {} diff --git a/module/plugins/hooks/DebridItaliaCom.py b/module/plugins/hooks/DebridItaliaCom.py index fb6be674f..1a081da7a 100644 --- a/module/plugins/hooks/DebridItaliaCom.py +++ b/module/plugins/hooks/DebridItaliaCom.py @@ -21,6 +21,7 @@ class DebridItaliaCom(MultiHoster): __name__ = "DebridItaliaCom" __version__ = "0.07" __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), ("hosterList", "str", "Hoster list (comma separated)", ""), @@ -31,6 +32,7 @@ class DebridItaliaCom(MultiHoster): __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" + def getHoster(self): return ["netload.in", "hotfile.com", "rapidshare.com", "multiupload.com", "uploading.com", "megashares.com", "crocko.com", "filepost.com", diff --git a/module/plugins/hooks/DeleteFinished.py b/module/plugins/hooks/DeleteFinished.py index 3bc98a7b3..48b262392 100644 --- a/module/plugins/hooks/DeleteFinished.py +++ b/module/plugins/hooks/DeleteFinished.py @@ -13,8 +13,6 @@ 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: Walter Purcaro """ from module.database import style @@ -24,15 +22,17 @@ from module.plugins.Hook import Hook class DeleteFinished(Hook): __name__ = 'DeleteFinished' __version__ = '1.09' - __description__ = 'Automatically delete all finished packages from queue' - __config__ = [ - ('activated', 'bool', 'Activated', 'False'), - ('interval', 'int', 'Delete every (hours)', '72'), - ('deloffline', 'bool', 'Delete packages with offline links', 'False') - ] + __type__ = "hook" + + __config__ = [('activated', 'bool', 'Activated', 'False'), + ('interval', 'int', 'Delete every (hours)', '72'), + ('deloffline', 'bool', 'Delete packages with offline links', 'False')] + + __description__ = """Automatically delete all finished packages from queue""" __author_name__ = ('Walter Purcaro') __author_mail__ = ('vuolter@gmail.com') + ## overwritten methods ## def periodical(self): if not self.info['sleep']: diff --git a/module/plugins/hooks/DownloadScheduler.py b/module/plugins/hooks/DownloadScheduler.py index 41a20e5d1..070c0634e 100644 --- a/module/plugins/hooks/DownloadScheduler.py +++ b/module/plugins/hooks/DownloadScheduler.py @@ -12,7 +12,6 @@ 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: zoidberg Original idea by new.cze """ @@ -25,14 +24,18 @@ from module.plugins.Hook import Hook class DownloadScheduler(Hook): __name__ = "DownloadScheduler" __version__ = "0.21" - __description__ = """Download Scheduler""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("timetable", "str", "List time periods as hh:mm full or number(kB/s)", "0:00 full, 7:00 250, 10:00 0, 17:00 150"), ("abort", "bool", "Abort active downloads when start period with speed 0", False)] + + __description__ = """Download Scheduler""" __author_name__ = ("zoidberg", "stickell") __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it") + def setup(self): self.cb = None # callback to scheduler job; will be by removed hookmanager when hook unloaded diff --git a/module/plugins/hooks/EasybytezCom.py b/module/plugins/hooks/EasybytezCom.py index a3a2dcb92..d3cda7b80 100644 --- a/module/plugins/hooks/EasybytezCom.py +++ b/module/plugins/hooks/EasybytezCom.py @@ -9,13 +9,16 @@ class EasybytezCom(MultiHoster): __name__ = "EasybytezCom" __version__ = "0.03" __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), ("hosterList", "str", "Hoster list (comma separated)", "")] + __description__ = """EasyBytez.com hook plugin""" __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" + def getHoster(self): self.account = self.core.accountManager.getAccountPlugin(self.__name__) user = self.account.selectAccount()[0] diff --git a/module/plugins/hooks/Ev0InFetcher.py b/module/plugins/hooks/Ev0InFetcher.py index 1e2b62062..d2caa19ac 100644 --- a/module/plugins/hooks/Ev0InFetcher.py +++ b/module/plugins/hooks/Ev0InFetcher.py @@ -13,8 +13,6 @@ 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 time import mktime, time @@ -25,7 +23,8 @@ from module.plugins.Hook import Hook class Ev0InFetcher(Hook): __name__ = "Ev0InFetcher" __version__ = "0.21" - __description__ = """Checks rss feeds for Ev0.in""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("interval", "int", "Check interval in minutes", 10), ("queue", "bool", "Move new shows directly to Queue", False), @@ -33,9 +32,12 @@ class Ev0InFetcher(Hook): ("quality", "xvid;x264;rmvb", "Video Format", "xvid"), ("hoster", "str", "Hoster to use (comma seperated)", "NetloadIn,RapidshareCom,MegauploadCom,HotfileCom")] + + __description__ = """Checks rss feeds for Ev0.in""" __author_name__ = "mkaay" __author_mail__ = "mkaay@mkaay.de" + def setup(self): self.interval = self.getConfig("interval") * 60 diff --git a/module/plugins/hooks/ExpertDecoders.py b/module/plugins/hooks/ExpertDecoders.py index 7be30f86e..65edd487b 100644 --- a/module/plugins/hooks/ExpertDecoders.py +++ b/module/plugins/hooks/ExpertDecoders.py @@ -13,8 +13,6 @@ 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, RaNaN, zoidberg """ from __future__ import with_statement @@ -32,15 +30,19 @@ from module.plugins.Hook import Hook class ExpertDecoders(Hook): __name__ = "ExpertDecoders" __version__ = "0.01" - __description__ = """Send captchas to expertdecoders.com""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("force", "bool", "Force CT even if client is connected", False), ("passkey", "password", "Access key", "")] + + __description__ = """Send captchas to expertdecoders.com""" __author_name__ = ("RaNaN", "zoidberg") __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz") API_URL = "http://www.fasttypers.org/imagepost.ashx" + def setup(self): self.info = {} diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py index 3d84dcc3d..55aae1093 100644 --- a/module/plugins/hooks/ExternalScripts.py +++ b/module/plugins/hooks/ExternalScripts.py @@ -13,9 +13,6 @@ 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.1 """ import subprocess @@ -29,13 +26,17 @@ from module.utils import save_join class ExternalScripts(Hook): __name__ = "ExternalScripts" __version__ = "0.23" - __description__ = """Run external scripts""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", True)] + + __description__ = """Run external scripts""" __author_name__ = ("mkaay", "RaNaN", "spoob") __author_mail__ = ("mkaay@mkaay.de", "ranan@pyload.org", "spoob@pyload.org") event_list = ["unrarFinished", "allDownloadsFinished", "allDownloadsProcessed"] + def setup(self): self.scripts = {} diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index 12e53fe50..a2e7d1dac 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -59,7 +59,8 @@ class ExtractArchive(Hook): """ __name__ = "ExtractArchive" __version__ = "0.16" - __description__ = """Extract different kind of archives""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", True), ("fullpath", "bool", "Extract full path", True), ("overwrite", "bool", "Overwrite files", True), @@ -71,11 +72,14 @@ class ExtractArchive(Hook): ("recursive", "bool", "Extract archives in archvies", True), ("queue", "bool", "Wait for all downloads to be finished", True), ("renice", "int", "CPU Priority", 0)] - __author_name__ = ("pyload Team", "AndroKev") - __author_mail__ = ("admin<at>pyload.org", "@pyloadforum") + + __description__ = """Extract different kind of archives""" + __author_name__ = ("pyLoad Team", "AndroKev") + __author_mail__ = ("admin@pyload.org", "@pyloadforum") event_list = ["allDownloadsProcessed"] + def setup(self): self.plugins = [] self.passwords = [] diff --git a/module/plugins/hooks/FastixRu.py b/module/plugins/hooks/FastixRu.py index 558da1b86..aa020ea37 100644 --- a/module/plugins/hooks/FastixRu.py +++ b/module/plugins/hooks/FastixRu.py @@ -11,14 +11,17 @@ class FastixRu(MultiHoster): __name__ = "FastixRu" __version__ = "0.02" __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), ("unloadFailing", "bool", "Revert to standard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] + __description__ = """Fastix.ru hook plugin""" __author_name__ = "Massimo Rosamilia" __author_mail__ = "max@spiritix.eu" + def getHoster(self): page = getURL( "http://fastix.ru/api_v2/?apikey=5182964c3f8f9a7f0b00000a_kelmFB4n1IrnCDYuIFn2y&sub=allowed_sources") diff --git a/module/plugins/hooks/FreeWayMe.py b/module/plugins/hooks/FreeWayMe.py index 7d4bcc852..3d2f7fcef 100644 --- a/module/plugins/hooks/FreeWayMe.py +++ b/module/plugins/hooks/FreeWayMe.py @@ -13,8 +13,6 @@ 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: Nicolas Giese """ from module.network.RequestFactory import getURL @@ -25,15 +23,18 @@ class FreeWayMe(MultiHoster): __name__ = "FreeWayMe" __version__ = "0.11" __type__ = "hook" - __description__ = """FreeWay.me hook plugin""" + __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), ("hosterList", "str", "Hoster list (comma separated)", ""), ("unloadFailing", "bool", "Revert to stanard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] + + __description__ = """FreeWay.me hook plugin""" __author_name__ = "Nicolas Giese" __author_mail__ = "james@free-way.me" + def getHoster(self): hostis = getURL("https://www.free-way.me/ajax/jd.php", get={"id": 3}).replace("\"", "").strip() self.logDebug("hosters: %s" % hostis) diff --git a/module/plugins/hooks/HotFolder.py b/module/plugins/hooks/HotFolder.py index a63b314d1..bd57712af 100644 --- a/module/plugins/hooks/HotFolder.py +++ b/module/plugins/hooks/HotFolder.py @@ -13,9 +13,6 @@ 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: RaNaN - @interface-version: 0.2 """ from os import makedirs @@ -32,15 +29,19 @@ from module.plugins.Hook import Hook class HotFolder(Hook): __name__ = "HotFolder" __version__ = "0.11" - __description__ = """Observe folder and file for changes and add container and links""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("folder", "str", "Folder to observe", "container"), ("watch_file", "bool", "Observe link file", False), ("keep", "bool", "Keep added containers", True), ("file", "str", "Link file", "links.txt")] + + __description__ = """Observe folder and file for changes and add container and links""" __author_name__ = "RaNaN" __author_mail__ = "RaNaN@pyload.de" + def setup(self): self.interval = 10 diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/hooks/IRCInterface.py index 760c1a4df..41ca352a4 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/hooks/IRCInterface.py @@ -13,10 +13,6 @@ 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: RaNaN - @author: jeix - @interface-version: 0.2 """ from select import select @@ -37,7 +33,8 @@ from module.Api import PackageDoesNotExists, FileDoesNotExists class IRCInterface(Thread, Hook): __name__ = "IRCInterface" __version__ = "0.11" - __description__ = """Connect to irc and let owner perform different tasks""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("host", "str", "IRC-Server Address", "Enter your server here!"), ("port", "int", "IRC-Server Port", 6667), @@ -48,9 +45,12 @@ class IRCInterface(Thread, Hook): ("info_file", "bool", "Inform about every file finished", False), ("info_pack", "bool", "Inform about every package finished", True), ("captcha", "bool", "Send captcha requests", True)] + + __description__ = """Connect to irc and let owner perform different tasks""" __author_name__ = "Jeix" __author_mail__ = "Jeix@hasnomail.com" + def __init__(self, core, manager): Thread.__init__(self) Hook.__init__(self, core, manager) diff --git a/module/plugins/hooks/ImageTyperz.py b/module/plugins/hooks/ImageTyperz.py index e2e9d93d5..3c23f9567 100644 --- a/module/plugins/hooks/ImageTyperz.py +++ b/module/plugins/hooks/ImageTyperz.py @@ -13,8 +13,6 @@ 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, RaNaN, zoidberg """ from __future__ import with_statement from thread import start_new_thread @@ -43,11 +41,14 @@ class ImageTyperzException(Exception): class ImageTyperz(Hook): __name__ = "ImageTyperz" __version__ = "0.04" - __description__ = """Send captchas to ImageTyperz.com""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("username", "str", "Username", ""), ("passkey", "password", "Password", ""), ("force", "bool", "Force IT even if client is connected", False)] + + __description__ = """Send captchas to ImageTyperz.com""" __author_name__ = ("RaNaN", "zoidberg") __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz") @@ -55,6 +56,7 @@ class ImageTyperz(Hook): RESPOND_URL = "http://captchatypers.com/Forms/SetBadImage.ashx" GETCREDITS_URL = "http://captchatypers.com/Forms/RequestBalance.ashx" + def setup(self): self.info = {} diff --git a/module/plugins/hooks/LinkdecrypterCom.py b/module/plugins/hooks/LinkdecrypterCom.py index dd9cd79f2..75995faf2 100644 --- a/module/plugins/hooks/LinkdecrypterCom.py +++ b/module/plugins/hooks/LinkdecrypterCom.py @@ -13,8 +13,6 @@ 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: zoidberg """ import re @@ -27,11 +25,15 @@ from module.utils import remove_chars class LinkdecrypterCom(Hook): __name__ = "LinkdecrypterCom" __version__ = "0.19" - __description__ = """Linkdecrypter.com hook plugin""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False)] + + __description__ = """Linkdecrypter.com hook plugin""" __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" + def coreReady(self): try: self.loadPatterns() diff --git a/module/plugins/hooks/LinksnappyCom.py b/module/plugins/hooks/LinksnappyCom.py index 110731228..a0e5b8d38 100644 --- a/module/plugins/hooks/LinksnappyCom.py +++ b/module/plugins/hooks/LinksnappyCom.py @@ -9,6 +9,7 @@ class LinksnappyCom(MultiHoster): __name__ = "LinksnappyCom" __version__ = "0.01" __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), ("hosterList", "str", "Hoster list (comma separated)", ""), @@ -19,6 +20,7 @@ class LinksnappyCom(MultiHoster): __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" + def getHoster(self): json_data = getURL('http://gen.linksnappy.com/lseAPI.php?act=FILEHOSTS') json_data = json_loads(json_data) diff --git a/module/plugins/hooks/MegaDebridEu.py b/module/plugins/hooks/MegaDebridEu.py index 0c3bb99f6..31be74fdd 100644 --- a/module/plugins/hooks/MegaDebridEu.py +++ b/module/plugins/hooks/MegaDebridEu.py @@ -23,12 +23,15 @@ class MegaDebridEu(MultiHoster): __name__ = "MegaDebridEu" __version__ = "0.02" __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("unloadFailing", "bool", "Revert to standard download if download fails", False)] + __description__ = """mega-debrid.eu hook plugin""" __author_name__ = "D.Ducatel" __author_mail__ = "dducatel@je-geek.fr" + def getHoster(self): reponse = getURL('http://www.mega-debrid.eu/api.php?action=getHosters') json_data = json_loads(reponse) diff --git a/module/plugins/hooks/MergeFiles.py b/module/plugins/hooks/MergeFiles.py index 99b0aafc6..e7bd63d17 100644 --- a/module/plugins/hooks/MergeFiles.py +++ b/module/plugins/hooks/MergeFiles.py @@ -13,8 +13,6 @@ 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: and9000 """ import os @@ -23,7 +21,7 @@ import traceback from os.path import join from module.utils import save_join, fs_encode -from module.plugins.Hook import Hook +from module.plugins.Hook import Hook, threaded BUFFER_SIZE = 4096 @@ -31,16 +29,20 @@ BUFFER_SIZE = 4096 class MergeFiles(Hook): __name__ = "MergeFiles" __version__ = "0.12" - __description__ = """Merges parts splitted with hjsplit""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False)] - __threaded__ = ["packageFinished"] + + __description__ = """Merges parts splitted with hjsplit""" __author_name__ = "and9000" __author_mail__ = "me@has-no-mail.com" + def setup(self): # nothing to do pass + @threaded def packageFinished(self, pack): files = {} fid_dict = {} diff --git a/module/plugins/hooks/MultiDebridCom.py b/module/plugins/hooks/MultiDebridCom.py index f2dfb18ca..3309fb9a8 100644 --- a/module/plugins/hooks/MultiDebridCom.py +++ b/module/plugins/hooks/MultiDebridCom.py @@ -23,6 +23,7 @@ class MultiDebridCom(MultiHoster): __name__ = "MultiDebridCom" __version__ = "0.01" __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), ("hosterList", "str", "Hoster list (comma separated)", ""), @@ -33,6 +34,7 @@ class MultiDebridCom(MultiHoster): __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" + def getHoster(self): json_data = getURL('http://multi-debrid.com/api.php?hosts', decode=True) self.logDebug('JSON data: ' + json_data) diff --git a/module/plugins/hooks/MultiHome.py b/module/plugins/hooks/MultiHome.py index b1635a588..5a7e53b0d 100644 --- a/module/plugins/hooks/MultiHome.py +++ b/module/plugins/hooks/MultiHome.py @@ -13,8 +13,6 @@ 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 time import time @@ -25,12 +23,16 @@ from module.plugins.Hook import Hook class MultiHome(Hook): __name__ = "MultiHome" __version__ = "0.11" - __description__ = """Ip address changer""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("interfaces", "str", "Interfaces", "None")] + + __description__ = """Ip address changer""" __author_name__ = "mkaay" __author_mail__ = "mkaay@mkaay.de" + def setup(self): self.register = {} self.interfaces = [] diff --git a/module/plugins/hooks/MultishareCz.py b/module/plugins/hooks/MultishareCz.py index 0291738f5..8baa4bb07 100644 --- a/module/plugins/hooks/MultishareCz.py +++ b/module/plugins/hooks/MultishareCz.py @@ -10,15 +10,18 @@ class MultishareCz(MultiHoster): __name__ = "MultishareCz" __version__ = "0.04" __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), ("hosterList", "str", "Hoster list (comma separated)", "uloz.to")] + __description__ = """MultiShare.cz hook plugin""" __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" HOSTER_PATTERN = r'<img class="logo-shareserveru"[^>]*?alt="([^"]+)"></td>\s*<td class="stav">[^>]*?alt="OK"' + def getHoster(self): page = getURL("http://www.multishare.cz/monitoring/") return re.findall(self.HOSTER_PATTERN, page) diff --git a/module/plugins/hooks/OverLoadMe.py b/module/plugins/hooks/OverLoadMe.py index e15d0b05f..dcc57aa75 100644 --- a/module/plugins/hooks/OverLoadMe.py +++ b/module/plugins/hooks/OverLoadMe.py @@ -8,16 +8,19 @@ class OverLoadMe(MultiHoster): __name__ = "OverLoadMe" __version__ = "0.01" __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("https", "bool", "Enable HTTPS", True), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), ("hosterList", "str", "Hoster list (comma separated)", ""), ("unloadFailing", "bool", "Revert to standard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 12)] + __description__ = """Over-Load.me hook plugin""" __author_name__ = "marley" __author_mail__ = "marley@over-load.me" + def getHoster(self): https = "https" if self.getConfig("https") else "http" page = getURL(https + "://api.over-load.me/hoster.php", diff --git a/module/plugins/hooks/Premium4Me.py b/module/plugins/hooks/Premium4Me.py index 57b188bb9..242e72f3e 100644 --- a/module/plugins/hooks/Premium4Me.py +++ b/module/plugins/hooks/Premium4Me.py @@ -12,10 +12,12 @@ class Premium4Me(MultiHoster): __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for downloads from supported hosters:", "all"), ("hosterList", "str", "Hoster list (comma separated)", "")] + __description__ = """Premium.to hook plugin""" __author_name__ = ("RaNaN", "zoidberg", "stickell") __author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz", "l.stickell@yahoo.it") + def getHoster(self): page = getURL("http://premium.to/api/hosters.php?authcode=%s" % self.account.authcode) return [x.strip() for x in page.replace("\"", "").split(";")] diff --git a/module/plugins/hooks/PremiumizeMe.py b/module/plugins/hooks/PremiumizeMe.py index 9f1a70a70..1a35460de 100644 --- a/module/plugins/hooks/PremiumizeMe.py +++ b/module/plugins/hooks/PremiumizeMe.py @@ -10,7 +10,6 @@ class PremiumizeMe(MultiHoster): __name__ = "PremiumizeMe" __version__ = "0.12" __type__ = "hook" - __description__ = """Premiumize.me hook plugin""" __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), @@ -18,9 +17,11 @@ class PremiumizeMe(MultiHoster): ("unloadFailing", "bool", "Revert to stanard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] + __description__ = """Premiumize.me hook plugin""" __author_name__ = "Florian Franzen" __author_mail__ = "FlorianFranzen@gmail.com" + def getHoster(self): # If no accounts are available there will be no hosters available if not self.account or not self.account.canUse(): diff --git a/module/plugins/hooks/RPNetBiz.py b/module/plugins/hooks/RPNetBiz.py index 54f814231..36cf69b4b 100644 --- a/module/plugins/hooks/RPNetBiz.py +++ b/module/plugins/hooks/RPNetBiz.py @@ -9,15 +9,18 @@ class RPNetBiz(MultiHoster): __name__ = "RPNetBiz" __version__ = "0.1" __type__ = "hook" - __description__ = """RPNet.biz hook plugin""" + __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"), ("hosterList", "str", "Hoster list (comma separated)", ""), ("unloadFailing", "bool", "Revert to stanard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] + + __description__ = """RPNet.biz hook plugin""" __author_name__ = "Dman" __author_mail__ = "dmanugm@gmail.com" + def getHoster(self): # No hosts supported if no account if not self.account or not self.account.canUse(): diff --git a/module/plugins/hooks/RealdebridCom.py b/module/plugins/hooks/RealdebridCom.py index 566f9005f..4477fba4a 100644 --- a/module/plugins/hooks/RealdebridCom.py +++ b/module/plugins/hooks/RealdebridCom.py @@ -15,10 +15,12 @@ class RealdebridCom(MultiHoster): ("hosterList", "str", "Hoster list (comma separated)", ""), ("unloadFailing", "bool", "Revert to stanard download if download fails", False), ("interval", "int", "Reload interval in hours (0 to disable)", 24)] + __description__ = """Real-Debrid.com hook plugin""" __author_name__ = "Devirex Hazzard" __author_mail__ = "naibaf_11@yahoo.de" + def getHoster(self): https = "https" if self.getConfig("https") else "http" page = getURL(https + "://real-debrid.com/api/hosters.php").replace("\"", "").strip() diff --git a/module/plugins/hooks/RehostTo.py b/module/plugins/hooks/RehostTo.py index 6c3a77ca3..0841e07a6 100644 --- a/module/plugins/hooks/RehostTo.py +++ b/module/plugins/hooks/RehostTo.py @@ -19,6 +19,7 @@ class RehostTo(MultiHoster): __author_name__ = "RaNaN" __author_mail__ = "RaNaN@pyload.org" + def getHoster(self): page = getURL("http://rehost.to/api.php?cmd=get_supported_och_dl&long_ses=%s" % self.long_ses) return [x.strip() for x in page.replace("\"", "").split(",")] diff --git a/module/plugins/hooks/RestartFailed.py b/module/plugins/hooks/RestartFailed.py index 3ee2aeed4..2bd0e28db 100644 --- a/module/plugins/hooks/RestartFailed.py +++ b/module/plugins/hooks/RestartFailed.py @@ -20,9 +20,12 @@ from module.plugins.Hook import Hook class RestartFailed(Hook): __name__ = "RestartFailed" __version__ = "1.55" - __description__ = """Periodically restart all failed downloads in queue""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("interval", "int", "Check interval in minutes", 90)] + + __description__ = """Periodically restart all failed downloads in queue""" __author_name__ = "Walter Purcaro" __author_mail__ = "vuolter@gmail.com" diff --git a/module/plugins/hooks/SimplyPremiumCom.py b/module/plugins/hooks/SimplyPremiumCom.py index 60d164c66..dbba3d1e9 100644 --- a/module/plugins/hooks/SimplyPremiumCom.py +++ b/module/plugins/hooks/SimplyPremiumCom.py @@ -24,15 +24,18 @@ class SimplyPremiumCom(MultiHoster): __name__ = "SimplyPremiumCom" __version__ = "0.02" __type__ = "hook" + __config__ = [("activated", "bool", "Activated", "False"), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), ("hosterList", "str", "Hoster list (comma separated)", ""), ("unloadFailing", "bool", "Revert to standard download if download fails", "False"), ("interval", "int", "Reload interval in hours (0 to disable)", "24")] + __description__ = """Simply-Premium.Com hook plugin""" __author_name__ = "EvolutionClip" __author_mail__ = "evolutionclip@live.de" + def getHoster(self): json_data = getURL('http://www.simply-premium.com/api/hosts.php?format=json&online=1') json_data = json_loads(json_data) diff --git a/module/plugins/hooks/SimplydebridCom.py b/module/plugins/hooks/SimplydebridCom.py index a523d2404..345d37e4a 100644 --- a/module/plugins/hooks/SimplydebridCom.py +++ b/module/plugins/hooks/SimplydebridCom.py @@ -8,13 +8,16 @@ class SimplydebridCom(MultiHoster): __name__ = "SimplydebridCom" __version__ = "0.01" __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), ("hosterList", "str", "Hoster list (comma separated)", "")] + __description__ = """Simply-Debrid.com hook plugin""" __author_name__ = "Kagenoshin" __author_mail__ = "kagenoshin@gmx.ch" + def getHoster(self): page = getURL("http://simply-debrid.com/api.php?list=1") return [x.strip() for x in page.rstrip(';').replace("\"", "").split(";")] diff --git a/module/plugins/hooks/UnSkipOnFail.py b/module/plugins/hooks/UnSkipOnFail.py index af6039ecd..f25482b79 100644 --- a/module/plugins/hooks/UnSkipOnFail.py +++ b/module/plugins/hooks/UnSkipOnFail.py @@ -13,8 +13,6 @@ 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: hgg """ from os.path import basename @@ -26,10 +24,14 @@ from module.PyFile import PyFile class UnSkipOnFail(Hook): __name__ = 'UnSkipOnFail' __version__ = '0.01' - __description__ = """When a download fails, restart skipped duplicates""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", True)] + + __description__ = """When a download fails, restart skipped duplicates""" __author_name__ = "hagg" - __author_mail__ = "" + __author_mail__ = None + def downloadFailed(self, pyfile): pyfile_name = basename(pyfile.name) diff --git a/module/plugins/hooks/UnrestrictLi.py b/module/plugins/hooks/UnrestrictLi.py index 4f8f11625..3303c7355 100644 --- a/module/plugins/hooks/UnrestrictLi.py +++ b/module/plugins/hooks/UnrestrictLi.py @@ -23,6 +23,7 @@ class UnrestrictLi(MultiHoster): __name__ = "UnrestrictLi" __version__ = "0.02" __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), ("hosterList", "str", "Hoster list (comma separated)", ""), @@ -34,6 +35,7 @@ class UnrestrictLi(MultiHoster): __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" + def getHoster(self): json_data = getURL('http://unrestrict.li/api/jdownloader/hosts.php?format=json') json_data = json_loads(json_data) diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py index f017acd92..242659d9e 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -15,12 +15,15 @@ from module.plugins.Hook import Expose, Hook, threaded class UpdateManager(Hook): __name__ = "UpdateManager" __version__ = "0.31" - __description__ = """Check for updates""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", True), ("mode", "pyLoad + plugins;plugins only", "Check updates for", "pyLoad + plugins"), ("interval", "int", "Check interval in hours", 8), ("reloadplugins", "bool", "Monitor plugins for code changes (debug mode only)", True), ("nodebugupdate", "bool", "Don't check for updates in debug mode", True)] + + __description__ = """Check for updates""" __author_name__ = "Walter Purcaro" __author_mail__ = "vuolter@gmail.com" diff --git a/module/plugins/hooks/WindowsPhoneToastNotify.py b/module/plugins/hooks/WindowsPhoneToastNotify.py index 7c005fcbb..25fa3abe5 100644 --- a/module/plugins/hooks/WindowsPhoneToastNotify.py +++ b/module/plugins/hooks/WindowsPhoneToastNotify.py @@ -13,8 +13,6 @@ 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: RaNaN, Godofdream, zoidberg """ import time import httplib @@ -24,15 +22,19 @@ from module.plugins.Hook import Hook class WindowsPhoneToastNotify(Hook): __name__ = "WindowsPhoneToastNotify" __version__ = "0.02" - __description__ = """Send push notifications to Windows Phone""" - __author_name__ = "Andy Voigt" - __author_mail__ = "phone-support@hotmail.de" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("force", "bool", "Force even if client is connected", False), ("pushId", "str", "pushId", ""), ("pushUrl", "str", "pushUrl", ""), ("pushTimeout", "int", "Timeout between notifications in seconds", 0)] + __description__ = """Send push notifications to Windows Phone""" + __author_name__ = "Andy Voigt" + __author_mail__ = "phone-support@hotmail.de" + + def setup(self): self.info = {} diff --git a/module/plugins/hooks/XFileSharingPro.py b/module/plugins/hooks/XFileSharingPro.py index 19ecc08b6..09d035e10 100644 --- a/module/plugins/hooks/XFileSharingPro.py +++ b/module/plugins/hooks/XFileSharingPro.py @@ -9,14 +9,17 @@ class XFileSharingPro(Hook): __name__ = "XFileSharingPro" __version__ = "0.11" __type__ = "hook" + __config__ = [("activated", "bool", "Activated", True), ("loadDefault", "bool", "Include default (built-in) hoster list", True), ("includeList", "str", "Include hosters (comma separated)", ""), ("excludeList", "str", "Exclude hosters (comma separated)", "")] + __description__ = """XFileSharingPro hook plugin""" __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" + def coreReady(self): self.loadPattern() diff --git a/module/plugins/hooks/XMPPInterface.py b/module/plugins/hooks/XMPPInterface.py index 5ecf4e153..7b179d41a 100644 --- a/module/plugins/hooks/XMPPInterface.py +++ b/module/plugins/hooks/XMPPInterface.py @@ -13,9 +13,6 @@ 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: RaNaN - @interface-version: 0.2 """ from pyxmpp import streamtls @@ -30,7 +27,8 @@ from module.plugins.hooks.IRCInterface import IRCInterface class XMPPInterface(IRCInterface, JabberClient): __name__ = "XMPPInterface" __version__ = "0.11" - __description__ = """Connect to jabber and let owner perform different tasks""" + __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("jid", "str", "Jabber ID", "user@exmaple-jabber-server.org"), ("pw", "str", "Password", ""), @@ -39,9 +37,12 @@ class XMPPInterface(IRCInterface, JabberClient): ("info_file", "bool", "Inform about every file finished", False), ("info_pack", "bool", "Inform about every package finished", True), ("captcha", "bool", "Send captcha requests", True)] + + __description__ = """Connect to jabber and let owner perform different tasks""" __author_name__ = "RaNaN" __author_mail__ = "RaNaN@pyload.org" + implements(IMessageHandlersProvider) def __init__(self, core, manager): diff --git a/module/plugins/hooks/ZeveraCom.py b/module/plugins/hooks/ZeveraCom.py index 4dee83ccb..49fc68b30 100644 --- a/module/plugins/hooks/ZeveraCom.py +++ b/module/plugins/hooks/ZeveraCom.py @@ -8,13 +8,16 @@ class ZeveraCom(MultiHoster): __name__ = "ZeveraCom" __version__ = "0.02" __type__ = "hook" + __config__ = [("activated", "bool", "Activated", False), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), ("hosterList", "str", "Hoster list (comma separated)", "")] + __description__ = """Real-Debrid.com hook plugin""" __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" + def getHoster(self): page = getURL("http://www.zevera.com/jDownloader.ashx?cmd=gethosters") return [x.strip() for x in page.replace("\"", "").split(",")] |