From 6f87a713970d6a18c0a3e622286488ec9e3b5494 Mon Sep 17 00:00:00 2001 From: stickell Date: Thu, 11 Sep 2014 15:52:16 +0200 Subject: [MultiDebrid] renaming files to MyfastlineCom --- module/plugins/hoster/MyfastfileCom.py | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 module/plugins/hoster/MyfastfileCom.py (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py new file mode 100644 index 000000000..7a5c2f515 --- /dev/null +++ b/module/plugins/hoster/MyfastfileCom.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- + +import re + +from module.common.json_layer import json_loads +from module.plugins.Hoster import Hoster + + +class MyfastfileCom(Hoster): + __name__ = "MyfastfileCom" + __type__ = "hoster" + __version__ = "0.04" + __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' + __description__ = """Myfastfile.com hoster plugin""" + __author_name__ = "stickell" + __author_mail__ = "l.stickell@yahoo.it" + + def setup(self): + self.chunkLimit = -1 + self.resumeDownload = True + + 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") % "Myfastfile.com") + self.fail("No Myfastfile.com account provided") + else: + self.logDebug("Original URL: %s" % pyfile.url) + page = self.req.load('http://myfastfile.com/api.php', + get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'], + 'link': pyfile.url}) + self.logDebug("JSON data: " + page) + page = json_loads(page) + if page['status'] != 'ok': + self.fail('Unable to unrestrict link') + new_url = page['link'] + + if new_url != pyfile.url: + self.logDebug("Unrestricted URL: " + new_url) + + self.download(new_url, disposition=True) -- 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/MyfastfileCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index 7a5c2f515..dee99d490 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -12,8 +12,8 @@ class MyfastfileCom(Hoster): __version__ = "0.04" __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' __description__ = """Myfastfile.com hoster plugin""" - __author_name__ = "stickell" - __author_mail__ = "l.stickell@yahoo.it" + __authors__ = [("stickell", "l.stickell@yahoo.it")] + def setup(self): self.chunkLimit = -1 -- 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/MyfastfileCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index dee99d490..02b91f599 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -12,6 +12,7 @@ class MyfastfileCom(Hoster): __version__ = "0.04" __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' __description__ = """Myfastfile.com hoster plugin""" + __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] -- cgit v1.2.3 From 332c248d0860c8c09d804055b6491dfbb654c8d3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:25:22 +0200 Subject: Newline cosmetics --- module/plugins/hoster/MyfastfileCom.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index 02b91f599..466bb95e8 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -10,7 +10,9 @@ class MyfastfileCom(Hoster): __name__ = "MyfastfileCom" __type__ = "hoster" __version__ = "0.04" + __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' + __description__ = """Myfastfile.com hoster plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] -- cgit v1.2.3 From bb68489d85d3aae3d050a8d198f6615aed379690 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Oct 2014 15:19:37 +0200 Subject: Change some self.req.load to self.load --- module/plugins/hoster/MyfastfileCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index 466bb95e8..8fbae3e0a 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -30,9 +30,9 @@ class MyfastfileCom(Hoster): self.fail("No Myfastfile.com account provided") else: self.logDebug("Original URL: %s" % pyfile.url) - page = self.req.load('http://myfastfile.com/api.php', - get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'], - 'link': pyfile.url}) + page = self.load('http://myfastfile.com/api.php', + get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'], + 'link': pyfile.url}) self.logDebug("JSON data: " + page) page = json_loads(page) if page['status'] != 'ok': -- 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/MyfastfileCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index 8fbae3e0a..d3a699e98 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -22,6 +22,7 @@ class MyfastfileCom(Hoster): self.chunkLimit = -1 self.resumeDownload = True + def process(self, pyfile): if re.match(self.__pattern__, pyfile.url): new_url = pyfile.url -- cgit v1.2.3 From e3f5280529921100f48bb8a79853bf480c7611e4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Oct 2014 02:53:05 +0200 Subject: Replace single quotes with doubles in self.error and self.fail msg --- module/plugins/hoster/MyfastfileCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index d3a699e98..a9e84a2f2 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -37,7 +37,7 @@ class MyfastfileCom(Hoster): self.logDebug("JSON data: " + page) page = json_loads(page) if page['status'] != 'ok': - self.fail('Unable to unrestrict link') + self.fail("Unable to unrestrict link") new_url = page['link'] if 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/MyfastfileCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index a9e84a2f2..64161affa 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -28,7 +28,7 @@ class MyfastfileCom(Hoster): new_url = pyfile.url elif not self.account: self.logError(_("Please enter your %s account or deactivate this plugin") % "Myfastfile.com") - self.fail("No Myfastfile.com account provided") + self.fail(_("No Myfastfile.com account provided")) else: self.logDebug("Original URL: %s" % pyfile.url) page = self.load('http://myfastfile.com/api.php', @@ -37,7 +37,7 @@ class MyfastfileCom(Hoster): self.logDebug("JSON data: " + page) page = json_loads(page) if page['status'] != 'ok': - self.fail("Unable to unrestrict link") + self.fail(_("Unable to unrestrict link")) new_url = page['link'] if new_url != pyfile.url: -- 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/MyfastfileCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index 64161affa..a2e582bd0 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -7,15 +7,15 @@ from module.plugins.Hoster import Hoster class MyfastfileCom(Hoster): - __name__ = "MyfastfileCom" - __type__ = "hoster" + __name__ = "MyfastfileCom" + __type__ = "hoster" __version__ = "0.04" __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' __description__ = """Myfastfile.com hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("stickell", "l.stickell@yahoo.it")] + __license__ = "GPLv3" + __authors__ = [("stickell", "l.stickell@yahoo.it")] def setup(self): -- 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/MyfastfileCom.py | 44 ++++++++++++++++------------------ 1 file changed, 20 insertions(+), 24 deletions(-) (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index a2e582bd0..947d302b5 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -3,10 +3,10 @@ import re from module.common.json_layer import json_loads -from module.plugins.Hoster import Hoster +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -class MyfastfileCom(Hoster): +class MyfastfileCom(SimpleHoster): __name__ = "MyfastfileCom" __type__ = "hoster" __version__ = "0.04" @@ -19,28 +19,24 @@ class MyfastfileCom(Hoster): def setup(self): - self.chunkLimit = -1 + self.chunkLimit = -1 self.resumeDownload = True - 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") % "Myfastfile.com") - self.fail(_("No Myfastfile.com account provided")) - else: - self.logDebug("Original URL: %s" % pyfile.url) - page = self.load('http://myfastfile.com/api.php', - get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'], - 'link': pyfile.url}) - self.logDebug("JSON data: " + page) - page = json_loads(page) - if page['status'] != 'ok': - self.fail(_("Unable to unrestrict link")) - new_url = page['link'] - - if new_url != pyfile.url: - self.logDebug("Unrestricted URL: " + new_url) - - self.download(new_url, disposition=True) + def handleMulti(self): + self.logDebug("Original URL: %s" % self.pyfile.url) + + page = self.load('http://myfastfile.com/api.php', + get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'], + 'link': self.pyfile.url}) + self.logDebug("JSON data: " + page) + page = json_loads(page) + if page['status'] != 'ok': + self.fail(_("Unable to unrestrict link")) + self.link = page['link'] + + if self.link != self.pyfile.url: + self.logDebug("Unrestricted URL: " + self.link) + + +getInfo = create_getInfo(MyfastfileCom) -- 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/MyfastfileCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index 947d302b5..f009a83b5 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class MyfastfileCom(SimpleHoster): __name__ = "MyfastfileCom" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' -- 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/MyfastfileCom.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index f009a83b5..2b9200d4b 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -18,6 +18,9 @@ class MyfastfileCom(SimpleHoster): __authors__ = [("stickell", "l.stickell@yahoo.it")] + MULTI_HOSTER = True + + def setup(self): self.chunkLimit = -1 self.resumeDownload = True -- 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/MyfastfileCom.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index 2b9200d4b..2f3b5bd91 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -3,13 +3,13 @@ import re from module.common.json_layer import json_loads -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -class MyfastfileCom(SimpleHoster): +class MyfastfileCom(MultiHoster): __name__ = "MyfastfileCom" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' @@ -18,9 +18,6 @@ class MyfastfileCom(SimpleHoster): __authors__ = [("stickell", "l.stickell@yahoo.it")] - MULTI_HOSTER = True - - def setup(self): self.chunkLimit = -1 self.resumeDownload = True -- 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/MyfastfileCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index 2f3b5bd91..7471086fb 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -9,7 +9,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class MyfastfileCom(MultiHoster): __name__ = "MyfastfileCom" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' @@ -23,7 +23,7 @@ class MyfastfileCom(MultiHoster): self.resumeDownload = True - def handleMulti(self): + def handlePremium(self): self.logDebug("Original URL: %s" % self.pyfile.url) page = self.load('http://myfastfile.com/api.php', -- cgit v1.2.3 From cdb06469a640c1875229903a2dbdfa8be469b5bc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 13:52:30 +0100 Subject: Improve a lot of plugin __pattern__ --- module/plugins/hoster/MyfastfileCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/MyfastfileCom.py') diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py index 7471086fb..b5b9ec820 100644 --- a/module/plugins/hoster/MyfastfileCom.py +++ b/module/plugins/hoster/MyfastfileCom.py @@ -11,7 +11,7 @@ class MyfastfileCom(MultiHoster): __type__ = "hoster" __version__ = "0.07" - __pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' + __pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/' __description__ = """Myfastfile.com hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3