summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/FreeWayMeHook.py
diff options
context:
space:
mode:
authorGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
committerGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
commitb0ef3f1673e1930916604bb1264ca3a38414bc8d (patch)
treec97936e4d2a4cd6eb1072c65c8a08a7d18816b18 /module/plugins/hooks/FreeWayMeHook.py
parent[XFileSharingPro][XFileSharingProFolder] Added default __pattern__ (diff)
parentFix https://github.com/pyload/pyload/issues/1707 (diff)
downloadpyload-b0ef3f1673e1930916604bb1264ca3a38414bc8d.tar.xz
Merge pull request #1 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/hooks/FreeWayMeHook.py')
-rw-r--r--module/plugins/hooks/FreeWayMeHook.py28
1 files changed, 12 insertions, 16 deletions
diff --git a/module/plugins/hooks/FreeWayMeHook.py b/module/plugins/hooks/FreeWayMeHook.py
index baea44540..1380433bf 100644
--- a/module/plugins/hooks/FreeWayMeHook.py
+++ b/module/plugins/hooks/FreeWayMeHook.py
@@ -6,27 +6,23 @@ from module.plugins.internal.MultiHook import MultiHook
class FreeWayMeHook(MultiHook):
__name__ = "FreeWayMeHook"
__type__ = "hook"
- __version__ = "0.15"
+ __version__ = "0.18"
+ __status__ = "testing"
- __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"),
- ("pluginlist" , "str" , "Plugin list (comma separated)" , "" ),
- ("revertfailed" , "bool" , "Revert to standard download if fails", True ),
- ("reload" , "bool" , "Reload plugin list" , True ),
- ("reloadinterval", "int" , "Reload interval in hours" , 12 )]
+ __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"),
+ ("pluginlist" , "str" , "Plugin list (comma separated)", "" ),
+ ("reload" , "bool" , "Reload plugin list" , True ),
+ ("reloadinterval", "int" , "Reload interval in hours" , 12 )]
__description__ = """FreeWay.me hook plugin"""
__license__ = "GPLv3"
__authors__ = [("Nicolas Giese", "james@free-way.me")]
- def getHosters(self):
- # Get account data
- if not self.account or not self.account.canUse():
- hostis = self.getURL("https://www.free-way.me/ajax/jd.php", get={"id": 3}).replace("\"", "").strip()
- else:
- self.logDebug("AccountInfo available - Get HosterList with User Pass")
- (user, data) = self.account.selectAccount()
- hostis = self.getURL("https://www.free-way.me/ajax/jd.php", get={"id": 3, "user": user, "pass": data['password']}).replace("\"", "").strip()
-
- self.logDebug("hosters: %s" % hostis)
+ def get_hosters(self):
+ user, info = self.account.select()
+ hostis = self.load("http://www.free-way.bz/ajax/jd.php",
+ get={'id' : 3,
+ 'user': user,
+ 'pass': info['login']['password']}).replace("\"", "") #@TODO: Revert to `https` in 0.4.10
return [x.strip() for x in hostis.split(",") if x.strip()]