From 285c4bd667d303efb0818f71b2e26bc9038eeee5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 10:09:56 +0200 Subject: Update plugins --- module/plugins/hoster/SmoozedCom.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'module/plugins/hoster/SmoozedCom.py') diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index 9ae12f145..5413fb7cb 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHoster import MultiHoster class SmoozedCom(MultiHoster): __name__ = "SmoozedCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -17,6 +17,10 @@ class SmoozedCom(MultiHoster): __authors__ = [("", "")] + FILE_ERRORS = [("Error", r'{"state":"error"}'), + ("Retry", r'{"state":"retry"}')] + + def handleFree(self, pyfile): # In some cases hostsers do not supply us with a filename at download, so we # are going to set a fall back filename (e.g. for freakshare or xfileshare) @@ -54,11 +58,3 @@ class SmoozedCom(MultiHoster): self.fail(_("Unable to initialize download")) else: self.link = header["location"][-1] if isinstance(header["location"], list) else header["location"] - - - def checkFile(self, rules={}): - if self.checkDownload({'error': '{"state":"error"}', - 'retry': '{"state":"retry"}'}): - self.fail(_("Error response received")) - - return super(SmoozedCom, self).checkFile(rules) -- cgit v1.2.3 From f0b7d1ef2b2e6068062996e01e9684628cdabb35 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 10 Jun 2015 10:40:43 +0200 Subject: Update plugins (2) --- module/plugins/hoster/SmoozedCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/SmoozedCom.py') diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index 5413fb7cb..bf9f387b4 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHoster import MultiHoster class SmoozedCom(MultiHoster): __name__ = "SmoozedCom" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady __config__ = [("use_premium", "bool", "Use premium account if available", True)] -- cgit v1.2.3 From 20b6a2ec022202b0efb6cb69415239fb8f4d1445 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:59:20 +0200 Subject: Spare code cosmetics (2) --- module/plugins/hoster/SmoozedCom.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/SmoozedCom.py') diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index bf9f387b4..af6c8b68e 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -22,18 +22,18 @@ class SmoozedCom(MultiHoster): def handleFree(self, pyfile): - # In some cases hostsers do not supply us with a filename at download, so we - # are going to set a fall back filename (e.g. for freakshare or xfileshare) - pyfile.name = pyfile.name.split('/').pop() # Remove everthing before last slash + #: In some cases hostsers do not supply us with a filename at download, so we + #: are going to set a fall back filename (e.g. for freakshare or xfileshare) + pyfile.name = pyfile.name.split('/').pop() #: Remove everthing before last slash - # Correction for automatic assigned filename: Removing html at end if needed + #: Correction for automatic assigned filename: Removing html at end if needed suffix_to_remove = ["html", "htm", "php", "php3", "asp", "shtm", "shtml", "cfml", "cfm"] temp = pyfile.name.split('.') if temp.pop() in suffix_to_remove: pyfile.name = ".".join(temp) - # Check the link + #: Check the link get_data = {'session_key': self.account.getAccountInfo(self.user)['session'], 'url' : pyfile.url} @@ -51,7 +51,7 @@ class SmoozedCom(MultiHoster): pyfile.name = data["data"]["name"] pyfile.size = int(data["data"]["size"]) - # Start the download + #: Start the download header = self.load("http://www2.smoozed.com/api/download", get=get_data, just_header=True) if not "location" in header: -- cgit v1.2.3 From 9305859b64a2f0aef3f27fb7e5b75caa0cb836a6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 19:24:49 +0200 Subject: Spare code cosmetics (3) --- module/plugins/hoster/SmoozedCom.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'module/plugins/hoster/SmoozedCom.py') diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index af6c8b68e..ab8e7b714 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -39,17 +39,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) @@ -57,4 +57,4 @@ 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'] -- cgit v1.2.3 From e4fb45b22d36595839e8f638a3f0a4669dba3e8d Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 21 Jun 2015 08:50:26 +0200 Subject: Spare code cosmetics (4) --- module/plugins/hoster/SmoozedCom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/SmoozedCom.py') diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index ab8e7b714..9b62314ad 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -10,7 +10,8 @@ class SmoozedCom(MultiHoster): __version__ = "0.07" __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady - __config__ = [("use_premium", "bool", "Use premium account if available", True)] + __config__ = [("use_premium" , "bool", "Use premium account if available" , True), + ("revertfailed", "bool", "Revert to standard download if fails", True)] __description__ = """Smoozed.com hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/hoster/SmoozedCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/SmoozedCom.py') diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index 9b62314ad..31b5dd4d7 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHoster import MultiHoster class SmoozedCom(MultiHoster): __name__ = "SmoozedCom" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -22,7 +22,7 @@ class SmoozedCom(MultiHoster): ("Retry", r'{"state":"retry"}')] - def handleFree(self, pyfile): + def handle_free(self, pyfile): #: In some cases hostsers do not supply us with a filename at download, so we #: are going to set a fall back filename (e.g. for freakshare or xfileshare) pyfile.name = pyfile.name.split('/').pop() #: Remove everthing before last slash -- cgit v1.2.3 From d2e2b127651a5a44b56337eb6d9ca246c97a208a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 17 Jul 2015 03:03:26 +0200 Subject: Spare fixes and code cosmetics --- module/plugins/hoster/SmoozedCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/SmoozedCom.py') diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index 31b5dd4d7..c278881f8 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -35,7 +35,7 @@ class SmoozedCom(MultiHoster): pyfile.name = ".".join(temp) #: Check the link - get_data = {'session_key': self.account.getAccountInfo(self.user)['session'], + get_data = {'session_key': self.account.get_account_info(self.user)['session'], 'url' : pyfile.url} data = json_loads(self.load("http://www2.smoozed.com/api/check", get=get_data)) -- cgit v1.2.3 From dad722ac7255640e7e0541c4094a4d2e4de79cd3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 00:05:58 +0200 Subject: Code cosmetics (2) --- module/plugins/hoster/SmoozedCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/SmoozedCom.py') diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index c278881f8..63d15153c 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -24,7 +24,7 @@ class SmoozedCom(MultiHoster): def handle_free(self, pyfile): #: In some cases hostsers do not supply us with a filename at download, so we - #: are going to set a fall back filename (e.g. for freakshare or xfileshare) + #: Are going to set a fall back filename (e.g. for freakshare or xfileshare) pyfile.name = pyfile.name.split('/').pop() #: Remove everthing before last slash #: Correction for automatic assigned filename: Removing html at end if needed -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/hoster/SmoozedCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/SmoozedCom.py') diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index 63d15153c..98da83350 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -8,6 +8,7 @@ class SmoozedCom(MultiHoster): __name__ = "SmoozedCom" __type__ = "hoster" __version__ = "0.08" + __status__ = "stable" __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady __config__ = [("use_premium" , "bool", "Use premium account if available" , True), -- cgit v1.2.3 From 4fc28dc09f9632eb4a15a1ef48778427f9dcae33 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 23 Jul 2015 18:53:06 +0200 Subject: Code cosmetics --- module/plugins/hoster/SmoozedCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/SmoozedCom.py') diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index 98da83350..55e594582 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -10,7 +10,7 @@ class SmoozedCom(MultiHoster): __version__ = "0.08" __status__ = "stable" - __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady + __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.activate __config__ = [("use_premium" , "bool", "Use premium account if available" , True), ("revertfailed", "bool", "Revert to standard download if fails", True)] -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- module/plugins/hoster/SmoozedCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/SmoozedCom.py') diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index 55e594582..7b52be2be 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -8,7 +8,7 @@ class SmoozedCom(MultiHoster): __name__ = "SmoozedCom" __type__ = "hoster" __version__ = "0.08" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.activate __config__ = [("use_premium" , "bool", "Use premium account if available" , True), -- cgit v1.2.3 From 8f17f875f6e28f73ddb10da59c6464bd04922222 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Jul 2015 04:59:27 +0200 Subject: Account rewritten --- module/plugins/hoster/SmoozedCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/SmoozedCom.py') diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index 7b52be2be..33d098a00 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -36,7 +36,7 @@ class SmoozedCom(MultiHoster): pyfile.name = ".".join(temp) #: Check the link - get_data = {'session_key': self.account.get_account_info(self.user)['session'], + get_data = {'session_key': self.account.get_data(self.user)['session'], 'url' : pyfile.url} data = json_loads(self.load("http://www2.smoozed.com/api/check", get=get_data)) -- cgit v1.2.3