summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/hook/FreeWayMe.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugin/hook/FreeWayMe.py')
-rw-r--r--pyload/plugin/hook/FreeWayMe.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/pyload/plugin/hook/FreeWayMe.py b/pyload/plugin/hook/FreeWayMe.py
index 711be37a8..086824550 100644
--- a/pyload/plugin/hook/FreeWayMe.py
+++ b/pyload/plugin/hook/FreeWayMe.py
@@ -6,13 +6,11 @@ from pyload.plugin.internal.MultiHook import MultiHook
class FreeWayMe(MultiHook):
__name__ = "FreeWayMe"
__type__ = "hook"
- __version__ = "0.14"
+ __version__ = "0.15"
__config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"),
("pluginlist" , "str" , "Plugin list (comma separated)" , "" ),
("revertfailed" , "bool" , "Revert to standard download if fails", True ),
- ("retry" , "int" , "Number of retries before revert" , 10 ),
- ("retryinterval" , "int" , "Retry interval in minutes" , 1 ),
("reload" , "bool" , "Reload plugin list" , True ),
("reloadinterval", "int" , "Reload interval in hours" , 12 )]
@@ -22,6 +20,13 @@ class FreeWayMe(MultiHook):
def getHosters(self):
- hostis = self.getURL("https://www.free-way.me/ajax/jd.php", get={'id': 3}).replace("\"", "").strip()
- self.logDebug("Hosters", hostis)
+ # 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)
return [x.strip() for x in hostis.split(",") if x.strip()]