From caf4c23a460056b5de35ec982c02e05d231709b1 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 15 Jun 2011 23:50:00 +0200 Subject: filesonic fix --- module/plugins/hoster/FilesonicCom.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'module/plugins') 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): -- cgit v1.2.3