summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar stickell <l.stickell@yahoo.it> 2015-02-23 18:32:22 +0100
committerGravatar stickell <l.stickell@yahoo.it> 2015-02-23 18:32:22 +0100
commit48ccd691cf434ca2d854b9005e9c4536f19b6bc2 (patch)
treecac1900b95cba07f2af57952d6a9f1e281c47e86
parentMerge pull request #1197 from immenz/dev_extract (diff)
parent[Hook] Free-way.me: Use login data while getting host list (diff)
downloadpyload-48ccd691cf434ca2d854b9005e9c4536f19b6bc2.tar.xz
Merge pull request #1203 from flubshi/stable
[Hook] Free-way.me: Use login data while getting host list
-rw-r--r--module/plugins/hooks/FreeWayMe.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/module/plugins/hooks/FreeWayMe.py b/module/plugins/hooks/FreeWayMe.py
index 6fec037d8..f819f730d 100644
--- a/module/plugins/hooks/FreeWayMe.py
+++ b/module/plugins/hooks/FreeWayMe.py
@@ -6,7 +6,7 @@ from module.plugins.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)" , "" ),
@@ -22,6 +22,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()]