diff options
author | 2015-04-18 14:08:18 +0200 | |
---|---|---|
committer | 2015-04-18 14:08:18 +0200 | |
commit | 6e8f84e1dc06cff6fa9387559992f555182c1774 (patch) | |
tree | 476600f9896fae029880e4049eb4c5e6021b202d /pyload/plugin/hoster/SmoozedCom.py | |
parent | fix: config cast (diff) | |
parent | Spare code cosmetics (5) (diff) | |
download | pyload-6e8f84e1dc06cff6fa9387559992f555182c1774.tar.xz |
Merge pull request #3 from vuolter/0.4.10
merge vuolter HEAD
Diffstat (limited to 'pyload/plugin/hoster/SmoozedCom.py')
-rw-r--r-- | pyload/plugin/hoster/SmoozedCom.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pyload/plugin/hoster/SmoozedCom.py b/pyload/plugin/hoster/SmoozedCom.py index 6d62cef23..1ed3a539d 100644 --- a/pyload/plugin/hoster/SmoozedCom.py +++ b/pyload/plugin/hoster/SmoozedCom.py @@ -35,17 +35,17 @@ class SmoozedCom(MultiHoster): data = json_loads(self.load("http://www2.smoozed.com/api/check", get=get_data)) - if data["state"] != "ok": - self.fail(data["message"]) + if data['state'] != "ok": + self.fail(data['message']) - if data["data"].get("state", "ok") != "ok": - if data["data"] == "Offline": + if data['data'].get("state", "ok") != "ok": + if data['data'] == "Offline": self.offline() else: - self.fail(data["data"]["message"]) + self.fail(data['data']['message']) - pyfile.name = data["data"]["name"] - pyfile.size = int(data["data"]["size"]) + pyfile.name = data['data']['name'] + pyfile.size = int(data['data']['size']) # Start the download header = self.load("http://www2.smoozed.com/api/download", get=get_data, just_header=True) @@ -53,7 +53,7 @@ class SmoozedCom(MultiHoster): if not "location" in header: self.fail(_("Unable to initialize download")) else: - self.link = header["location"][-1] if isinstance(header["location"], list) else header["location"] + self.link = header['location'][-1] if isinstance(header['location'], list) else header['location'] def checkFile(self, rules={}): |