From 7d78210720ed3bde25ca240f8bd061cc6210e3fb Mon Sep 17 00:00:00 2001 From: Stefano Date: Thu, 26 Jun 2014 22:02:55 +0200 Subject: [SimplyPremium] Fix #649 --- module/plugins/hoster/SimplyPremiumCom.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index c9fbf2ff1..17060e00d 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -34,12 +34,12 @@ def secondsToMidnight(): class SimplyPremiumCom(Hoster): __name__ = "SimplyPremiumCom" - __version__ = "0.01" + __version__ = "0.02" __type__ = "hoster" __pattern__ = r"https?://.*(simply-premium)\.com" __description__ = """Simply-Premium.Com hoster plugin""" - __author_name__ = ("EvolutionClip") - __author_mail__ = ("evolutionclip@live.de") + __author_name__ = "EvolutionClip" + __author_mail__ = "evolutionclip@live.de" def setup(self): self.chunkLimit = 16 @@ -82,20 +82,19 @@ class SimplyPremiumCom(Hoster): #self.api_data = page[new_url] try: - start = page.index('') + len('') - end = page.index('', start) - self.pyfile.name = page[start:end] - except ValueError: + self.pyfile.name = re.search(r'([^<]+)', page).group(1) + except AttributeError: self.pyfile.name = "" try: - start = page.index('') + len('') - end = page.index('', start) - self.pyfile.size = int(float(page[start:end])) - except ValueError: + self.pyfile.size = re.search(r'(\d+)', page).group(1) + except AttributeError: self.pyfile.size = 0 - new_url = 'http://www.simply-premium.com/premium.php?link=' + pyfile.url + try: + new_url = re.search(r'([^<]+)', page).group(1) + except AttributeError: + new_url = 'http://www.simply-premium.com/premium.php?link=' + pyfile.url if new_url != pyfile.url: self.logDebug("New URL: " + new_url) -- cgit v1.2.3 From 0072668fd976f9ce4dbaac7e807791f21cbe07ed Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 6 Jul 2014 18:57:55 +0200 Subject: Compute wait time using secondsToMidnight --- module/plugins/hoster/SimplyPremiumCom.py | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index 17060e00d..dcd97d1e3 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -19,22 +19,12 @@ import re from datetime import datetime, timedelta from module.plugins.Hoster import Hoster - - -def secondsToMidnight(): - # Seconds until 00:10 GMT+2 - now = datetime.utcnow() + timedelta(hours=2) - if now.hour is 0 and now.minute < 10: - midnight = now - else: - midnight = now + timedelta(days=1) - midnight = midnight.replace(hour=0, minute=10, second=0, microsecond=0) - return int((midnight - now).total_seconds()) +from module.plugins.hoster.UnrestrictLi import secondsToMidnight class SimplyPremiumCom(Hoster): __name__ = "SimplyPremiumCom" - __version__ = "0.02" + __version__ = "0.03" __type__ = "hoster" __pattern__ = r"https?://.*(simply-premium)\.com" __description__ = """Simply-Premium.Com hoster plugin""" @@ -69,13 +59,13 @@ class SimplyPremiumCom(Hoster): elif "NOTFOUND" in page: self.offline() elif "downloadlimit" in page: - self.logInfo("Reached maximum connctions") + self.logWarning("Reached maximum connctions") self.retry(5, 60, "Reached maximum connctions") elif "trafficlimit" in page: - self.logInfo("Reached daily limit for this host. Waiting until 00:10 GMT+2") - self.retry(5, secondsToMidnight(), "Daily limit for this host reached") + self.logWarning("Reached daily limit for this host") + self.retry(1, secondsToMidnight(gmt=2), "Daily limit for this host reached") elif "hostererror" in page: - self.logInfo("Hoster temporarily unavailable, waiting 1 minute and retry") + self.logWarning("Hoster temporarily unavailable, waiting 1 minute and retry") self.retry(5, 60, "Hoster is temporarily unavailable") #page = json_loads(page) #new_url = page.keys()[0] -- cgit v1.2.3 From 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:25:41 +0200 Subject: Fix code indentation, some bad whitespaces and missing authors + use 'not' instead 'is None' + replace __pattern__'s r" with r' + other minor cosmetics --- module/plugins/hoster/SimplyPremiumCom.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index dcd97d1e3..c0be4b145 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- - ############################################################################ # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU Affero General Public License as # @@ -26,8 +25,8 @@ class SimplyPremiumCom(Hoster): __name__ = "SimplyPremiumCom" __version__ = "0.03" __type__ = "hoster" - __pattern__ = r"https?://.*(simply-premium)\.com" - __description__ = """Simply-Premium.Com hoster plugin""" + __pattern__ = r'https?://.*(simply-premium)\.com' + __description__ = """Simply-Premium.com hoster plugin""" __author_name__ = "EvolutionClip" __author_mail__ = "evolutionclip@live.de" -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/hoster/SimplyPremiumCom.py | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index c0be4b145..5db9f5daa 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -1,20 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################ -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU Affero General Public License as # -# published by the Free Software Foundation, either version 3 of the # -# License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU Affero General Public License for more details. # -# # -# You should have received a copy of the GNU Affero General Public License # -# along with this program. If not, see . # -############################################################################ import re + from datetime import datetime, timedelta from module.plugins.Hoster import Hoster @@ -23,13 +10,16 @@ from module.plugins.hoster.UnrestrictLi import secondsToMidnight class SimplyPremiumCom(Hoster): __name__ = "SimplyPremiumCom" - __version__ = "0.03" __type__ = "hoster" + __version__ = "0.03" + __pattern__ = r'https?://.*(simply-premium)\.com' + __description__ = """Simply-Premium.com hoster plugin""" __author_name__ = "EvolutionClip" __author_mail__ = "evolutionclip@live.de" + def setup(self): self.chunkLimit = 16 self.resumeDownload = False -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/hoster/SimplyPremiumCom.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index 5db9f5daa..044a2c9f7 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -16,8 +16,7 @@ class SimplyPremiumCom(Hoster): __pattern__ = r'https?://.*(simply-premium)\.com' __description__ = """Simply-Premium.com hoster plugin""" - __author_name__ = "EvolutionClip" - __author_mail__ = "evolutionclip@live.de" + __authors__ = [("EvolutionClip", "evolutionclip@live.de")] def setup(self): -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/hoster/SimplyPremiumCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index 044a2c9f7..e78a1f469 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -16,6 +16,7 @@ class SimplyPremiumCom(Hoster): __pattern__ = r'https?://.*(simply-premium)\.com' __description__ = """Simply-Premium.com hoster plugin""" + __license__ = "GPLv3" __authors__ = [("EvolutionClip", "evolutionclip@live.de")] -- cgit v1.2.3 From 0eb6e7ec4a1144dcca824d8add049787d3da1762 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 19:44:59 +0200 Subject: Two space before function declaration --- module/plugins/hoster/SimplyPremiumCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index e78a1f469..965c1421a 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -24,6 +24,7 @@ class SimplyPremiumCom(Hoster): self.chunkLimit = 16 self.resumeDownload = False + def process(self, pyfile): if re.match(self.__pattern__, pyfile.url): new_url = pyfile.url -- cgit v1.2.3 From 9f2ebe486a3e155fb6a60e07cccb77ab6a772eb2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 26 Oct 2014 02:31:54 +0200 Subject: Extend translation support in plugins + a lot of code cosmetics and typo fixes --- module/plugins/hoster/SimplyPremiumCom.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index 965c1421a..f236fb01c 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -30,7 +30,7 @@ class SimplyPremiumCom(Hoster): new_url = pyfile.url elif not self.account: self.logError(_("Please enter your %s account or deactivate this plugin") % "Simply-Premium.com") - self.fail("No Simply-Premium.com account provided") + self.fail(_("No Simply-Premium.com account provided")) else: self.logDebug("Old URL: %s" % pyfile.url) for i in xrange(5): @@ -39,7 +39,7 @@ class SimplyPremiumCom(Hoster): if page != '': break else: - self.logInfo("Unable to get API data, waiting 1 minute and retry") + self.logInfo(_("Unable to get API data, waiting 1 minute and retry")) self.retry(5, 60, "Unable to get API data") if '0' in page or ( @@ -49,13 +49,13 @@ class SimplyPremiumCom(Hoster): elif "NOTFOUND" in page: self.offline() elif "downloadlimit" in page: - self.logWarning("Reached maximum connctions") + self.logWarning(_("Reached maximum connctions")) self.retry(5, 60, "Reached maximum connctions") elif "trafficlimit" in page: - self.logWarning("Reached daily limit for this host") + self.logWarning(_("Reached daily limit for this host")) self.retry(1, secondsToMidnight(gmt=2), "Daily limit for this host reached") elif "hostererror" in page: - self.logWarning("Hoster temporarily unavailable, waiting 1 minute and retry") + self.logWarning(_("Hoster temporarily unavailable, waiting 1 minute and retry")) self.retry(5, 60, "Hoster is temporarily unavailable") #page = json_loads(page) #new_url = page.keys()[0] -- cgit v1.2.3 From 8b3589dd394d81177bf4680dddb5bdb9506b89ea Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:04:10 +0100 Subject: Update plugins to last changes --- module/plugins/hoster/SimplyPremiumCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index f236fb01c..fbc7939e5 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -53,7 +53,7 @@ class SimplyPremiumCom(Hoster): self.retry(5, 60, "Reached maximum connctions") elif "trafficlimit" in page: self.logWarning(_("Reached daily limit for this host")) - self.retry(1, secondsToMidnight(gmt=2), "Daily limit for this host reached") + self.retry(wait_time=secondsToMidnight(gmt=2), "Daily limit for this host reached") elif "hostererror" in page: self.logWarning(_("Hoster temporarily unavailable, waiting 1 minute and retry")) self.retry(5, 60, "Hoster is temporarily unavailable") -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/hoster/SimplyPremiumCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index fbc7939e5..17330c5f9 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -9,15 +9,15 @@ from module.plugins.hoster.UnrestrictLi import secondsToMidnight class SimplyPremiumCom(Hoster): - __name__ = "SimplyPremiumCom" - __type__ = "hoster" + __name__ = "SimplyPremiumCom" + __type__ = "hoster" __version__ = "0.03" __pattern__ = r'https?://.*(simply-premium)\.com' __description__ = """Simply-Premium.com hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("EvolutionClip", "evolutionclip@live.de")] + __license__ = "GPLv3" + __authors__ = [("EvolutionClip", "evolutionclip@live.de")] def setup(self): -- cgit v1.2.3 From 67587fbe0335cacfde28a86ba729b9d567ce1da7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 7 Dec 2014 00:27:18 +0100 Subject: Plugin code cosmetics (3) --- module/plugins/hoster/SimplyPremiumCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index 17330c5f9..bc37f45c8 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -34,7 +34,7 @@ class SimplyPremiumCom(Hoster): else: self.logDebug("Old URL: %s" % pyfile.url) for i in xrange(5): - page = self.load('http://www.simply-premium.com/premium.php?info&link=' + pyfile.url) + page = self.load("http://www.simply-premium.com/premium.php", get={'info': "", 'link': pyfile.url}) self.logDebug("JSON data: " + page) if page != '': break -- cgit v1.2.3 From 57300575fa97107d172e0c9909b244c8c8ae6c12 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Dec 2014 20:02:20 +0100 Subject: Extend SimpleHoster in multi-hoster plugins --- module/plugins/hoster/SimplyPremiumCom.py | 109 ++++++++++++++---------------- 1 file changed, 52 insertions(+), 57 deletions(-) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index bc37f45c8..c7eed0680 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -4,11 +4,11 @@ import re from datetime import datetime, timedelta -from module.plugins.Hoster import Hoster +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.plugins.hoster.UnrestrictLi import secondsToMidnight -class SimplyPremiumCom(Hoster): +class SimplyPremiumCom(SimpleHoster): __name__ = "SimplyPremiumCom" __type__ = "hoster" __version__ = "0.03" @@ -21,62 +21,57 @@ class SimplyPremiumCom(Hoster): def setup(self): - self.chunkLimit = 16 + self.chunkLimit = 16 self.resumeDownload = False - def process(self, pyfile): - if re.match(self.__pattern__, pyfile.url): - new_url = pyfile.url - elif not self.account: - self.logError(_("Please enter your %s account or deactivate this plugin") % "Simply-Premium.com") - self.fail(_("No Simply-Premium.com account provided")) + def handleMulti(self): + for i in xrange(5): + page = self.load("http://www.simply-premium.com/premium.php", get={'info': "", 'link': self.pyfile.url}) + self.logDebug("JSON data: " + page) + if page != '': + break else: - self.logDebug("Old URL: %s" % pyfile.url) - for i in xrange(5): - page = self.load("http://www.simply-premium.com/premium.php", get={'info': "", 'link': pyfile.url}) - self.logDebug("JSON data: " + page) - if page != '': - break - else: - self.logInfo(_("Unable to get API data, waiting 1 minute and retry")) - self.retry(5, 60, "Unable to get API data") - - if '0' in page or ( - "You are not allowed to download from this host" in page and self.premium): - self.account.relogin(self.user) - self.retry() - elif "NOTFOUND" in page: - self.offline() - elif "downloadlimit" in page: - self.logWarning(_("Reached maximum connctions")) - self.retry(5, 60, "Reached maximum connctions") - elif "trafficlimit" in page: - self.logWarning(_("Reached daily limit for this host")) - self.retry(wait_time=secondsToMidnight(gmt=2), "Daily limit for this host reached") - elif "hostererror" in page: - self.logWarning(_("Hoster temporarily unavailable, waiting 1 minute and retry")) - self.retry(5, 60, "Hoster is temporarily unavailable") - #page = json_loads(page) - #new_url = page.keys()[0] - #self.api_data = page[new_url] - - try: - self.pyfile.name = re.search(r'([^<]+)', page).group(1) - except AttributeError: - self.pyfile.name = "" - - try: - self.pyfile.size = re.search(r'(\d+)', page).group(1) - except AttributeError: - self.pyfile.size = 0 - - try: - new_url = re.search(r'([^<]+)', page).group(1) - except AttributeError: - new_url = 'http://www.simply-premium.com/premium.php?link=' + pyfile.url - - if new_url != pyfile.url: - self.logDebug("New URL: " + new_url) - - self.download(new_url, disposition=True) + self.logInfo(_("Unable to get API data, waiting 1 minute and retry")) + self.retry(5, 60, "Unable to get API data") + + if '0' in page or ( + "You are not allowed to download from this host" in page and self.premium): + self.account.relogin(self.user) + self.retry() + + elif "NOTFOUND" in page: + self.offline() + + elif "downloadlimit" in page: + self.logWarning(_("Reached maximum connctions")) + self.retry(5, 60, "Reached maximum connctions") + + elif "trafficlimit" in page: + self.logWarning(_("Reached daily limit for this host")) + self.retry(wait_time=secondsToMidnight(gmt=2), "Daily limit for this host reached") + + elif "hostererror" in page: + self.logWarning(_("Hoster temporarily unavailable, waiting 1 minute and retry")) + self.retry(5, 60, "Hoster is temporarily unavailable") + + try: + self.pyfile.name = re.search(r'([^<]+)', page).group(1) + except AttributeError: + self.pyfile.name = "" + + try: + self.pyfile.size = re.search(r'(\d+)', page).group(1) + except AttributeError: + self.pyfile.size = 0 + + try: + self.link = re.search(r'([^<]+)', page).group(1) + except AttributeError: + self.link = 'http://www.simply-premium.com/premium.php?link=' + self.pyfile.url + + if self.link != self.pyfile.url: + self.logDebug("New URL: " + self.link) + + +getInfo = create_getInfo(SimplyPremiumCom) -- cgit v1.2.3 From 46f748a94ea5ab62ab0839ff0ce01e12e3eac688 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Dec 2014 21:47:39 +0100 Subject: Extend SimpleHoster in multi-hoster plugins (2) --- module/plugins/hoster/SimplyPremiumCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index c7eed0680..e381fb29f 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -11,7 +11,7 @@ from module.plugins.hoster.UnrestrictLi import secondsToMidnight class SimplyPremiumCom(SimpleHoster): __name__ = "SimplyPremiumCom" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://.*(simply-premium)\.com' -- cgit v1.2.3 From 0860e09f5ff16ee3f097f6f9d444f277a38abd72 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Dec 2014 23:03:46 +0100 Subject: Extend SimpleHoster in multi-hoster plugins (3) --- module/plugins/hoster/SimplyPremiumCom.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index e381fb29f..9857f514a 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -20,6 +20,9 @@ class SimplyPremiumCom(SimpleHoster): __authors__ = [("EvolutionClip", "evolutionclip@live.de")] + MULTI_HOSTER = True + + def setup(self): self.chunkLimit = 16 self.resumeDownload = False -- cgit v1.2.3 From 87203e996fb42c172b15e29f0e394d5b328d9ac2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 23 Dec 2014 13:20:53 +0100 Subject: New plugin: MultiHoster --- module/plugins/hoster/SimplyPremiumCom.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index 9857f514a..98233b292 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -4,14 +4,14 @@ import re from datetime import datetime, timedelta -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo from module.plugins.hoster.UnrestrictLi import secondsToMidnight -class SimplyPremiumCom(SimpleHoster): +class SimplyPremiumCom(MultiHoster): __name__ = "SimplyPremiumCom" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'https?://.*(simply-premium)\.com' @@ -20,9 +20,6 @@ class SimplyPremiumCom(SimpleHoster): __authors__ = [("EvolutionClip", "evolutionclip@live.de")] - MULTI_HOSTER = True - - def setup(self): self.chunkLimit = 16 self.resumeDownload = False -- cgit v1.2.3 From a4786e340993bbfc5d2bf971c9bec18863d3dd80 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 23 Dec 2014 19:29:15 +0100 Subject: [MultiHoster] Update --- module/plugins/hoster/SimplyPremiumCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index 98233b292..87ccb317e 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -11,7 +11,7 @@ from module.plugins.hoster.UnrestrictLi import secondsToMidnight class SimplyPremiumCom(MultiHoster): __name__ = "SimplyPremiumCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'https?://.*(simply-premium)\.com' @@ -25,7 +25,7 @@ class SimplyPremiumCom(MultiHoster): self.resumeDownload = False - def handleMulti(self): + def handlePremium(self): for i in xrange(5): page = self.load("http://www.simply-premium.com/premium.php", get={'info': "", 'link': self.pyfile.url}) self.logDebug("JSON data: " + page) -- cgit v1.2.3 From d09306aa1f9103141e7fc7c4e72588bf46be71da Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 13:49:50 +0100 Subject: [SimplyPremiumCom] Fixup --- module/plugins/hoster/SimplyPremiumCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py index 87ccb317e..bf7c43af6 100644 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ b/module/plugins/hoster/SimplyPremiumCom.py @@ -5,15 +5,15 @@ import re from datetime import datetime, timedelta from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.hoster.UnrestrictLi import secondsToMidnight +from module.plugins.internal.SimpleHoster import secondsToMidnight class SimplyPremiumCom(MultiHoster): __name__ = "SimplyPremiumCom" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" - __pattern__ = r'https?://.*(simply-premium)\.com' + __pattern__ = r'https?://.+simply-premium\.com' __description__ = """Simply-Premium.com hoster plugin""" __license__ = "GPLv3" @@ -49,7 +49,7 @@ class SimplyPremiumCom(MultiHoster): elif "trafficlimit" in page: self.logWarning(_("Reached daily limit for this host")) - self.retry(wait_time=secondsToMidnight(gmt=2), "Daily limit for this host reached") + self.retry(wait_time=secondsToMidnight(gmt=2), reason="Daily limit for this host reached") elif "hostererror" in page: self.logWarning(_("Hoster temporarily unavailable, waiting 1 minute and retry")) -- cgit v1.2.3