summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-15 23:50:00 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-15 23:50:00 +0200
commitcaf4c23a460056b5de35ec982c02e05d231709b1 (patch)
treeb65e0698585f2a0be02ebf248adc8dedd541ed68 /module
parentAdded tag v0.4.6 for changeset 306333a1c05b (diff)
downloadpyload-caf4c23a460056b5de35ec982c02e05d231709b1.tar.xz
filesonic fix
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hoster/FilesonicCom.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py
index dfc332e01..d9d8340e3 100644
--- a/module/plugins/hoster/FilesonicCom.py
+++ b/module/plugins/hoster/FilesonicCom.py
@@ -49,7 +49,7 @@ class FilesonicCom(Hoster):
__name__ = "FilesonicCom"
__type__ = "hoster"
__pattern__ = r"http://[\w\.]*?(sharingmatrix|filesonic)\..*?/file/(([a-z][0-9]+/)?[0-9]+)(/.*)?"
- __version__ = "0.31"
+ __version__ = "0.32"
__description__ = """FilesonicCom und Sharingmatrix Download Hoster"""
__author_name__ = ("jeix", "paulking")
__author_mail__ = ("jeix@hasnomail.de", "")
@@ -126,7 +126,14 @@ class FilesonicCom(Hoster):
self.user, self.account.getAccountData(self.user)["password"], getId(self.pyfile.url))
result = json_loads(self.load(api))
- dl = result["FSApi_Link"]["getDownloadLink"]["response"]["links"][0]["url"]
+ links = result["FSApi_Link"]["getDownloadLink"]["response"]["links"]
+
+ #wupload seems to return list and no dicts
+ if type(links) == dict:
+ dl = links.values()[0]["url"]
+ else:
+ dl = [0]["url"]
+
self.download(dl)
def downloadFree(self):