diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-09-14 13:35:34 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-09-14 13:35:34 +0200 |
commit | 1066d65b9ed19d8e1b061c13fc0156d823fea800 (patch) | |
tree | 4c1fcd3b0660d2ccb3ce4d2abc0077f1a7876725 /pyload/plugins/hooks/PremiumTo.py | |
parent | Docs cleanup + remove script directory (diff) | |
parent | [FTP] Restore pattern. (diff) | |
download | pyload-1066d65b9ed19d8e1b061c13fc0156d823fea800.tar.xz |
Merge remote-tracking branch 'pyload/stable' into 0.4.10
Conflicts:
module/plugins/accounts/MultiDebridCom.py
module/plugins/accounts/MyfastfileCom.py
module/plugins/hooks/MultiDebridCom.py
module/plugins/hooks/MyfastfileCom.py
module/plugins/hooks/Premium4Me.py
module/plugins/hooks/PremiumTo.py
module/plugins/hoster/MultiDebridCom.py
module/plugins/hoster/MyfastfileCom.py
module/plugins/hoster/Premium4Me.py
module/plugins/hoster/PremiumTo.py
pyload/plugins/accounts/MultiDebridCom.py
pyload/plugins/accounts/Premium4Me.py
pyload/plugins/hooks/MultiDebridCom.py
pyload/plugins/hooks/Premium4Me.py
pyload/plugins/hoster/MultiDebridCom.py
pyload/plugins/hoster/Premium4Me.py
Diffstat (limited to 'pyload/plugins/hooks/PremiumTo.py')
-rw-r--r-- | pyload/plugins/hooks/PremiumTo.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/pyload/plugins/hooks/PremiumTo.py b/pyload/plugins/hooks/PremiumTo.py new file mode 100644 index 000000000..b95b15b53 --- /dev/null +++ b/pyload/plugins/hooks/PremiumTo.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- + +from pyload.network.RequestFactory import getURL +from pyload.plugins.internal.MultiHoster import MultiHoster + + +class PremiumTo(MultiHoster): + __name__ = "PremiumTo" + __type__ = "hook" + __version__ = "0.04" + + __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", + get={'username': self.account.username, 'password': self.account.password}) + return [x.strip() for x in page.replace("\"", "").split(";")] + + def coreReady(self): + self.account = self.core.accountManager.getAccountPlugin("PremiumTo") + + user = self.account.selectAccount()[0] + + if not user: + self.logError(_("Please add your premium.to account first and restart pyLoad")) + return + + return MultiHoster.coreReady(self) |