From 164512b6a74c94a731fcee7435dce1ccfa2f71e7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:29:50 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/MegacrypterCom.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/MegacrypterCom.py') diff --git a/module/plugins/hoster/MegacrypterCom.py b/module/plugins/hoster/MegacrypterCom.py index 10a2eb025..aea564ded 100644 --- a/module/plugins/hoster/MegacrypterCom.py +++ b/module/plugins/hoster/MegacrypterCom.py @@ -24,7 +24,9 @@ class MegacrypterCom(MegaCoNz): def api_response(self, **kwargs): - """ Dispatch a call to the api, see megacrypter.com/api_doc """ + """ + Dispatch a call to the api, see megacrypter.com/api_doc + """ self.logDebug("JSON request: " + json_dumps(kwargs)) res = self.load(self.API_URL, post=json_dumps(kwargs)) self.logDebug("API Response: " + res) -- 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/MegacrypterCom.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster/MegacrypterCom.py') diff --git a/module/plugins/hoster/MegacrypterCom.py b/module/plugins/hoster/MegacrypterCom.py index aea564ded..27c3c7253 100644 --- a/module/plugins/hoster/MegacrypterCom.py +++ b/module/plugins/hoster/MegacrypterCom.py @@ -34,18 +34,18 @@ class MegacrypterCom(MegaCoNz): def process(self, pyfile): - # match is guaranteed because plugin was chosen to handle url + #: match is guaranteed because plugin was chosen to handle url node = re.match(self.__pattern__, pyfile.url).group(0) - # get Mega.co.nz link info + #: get Mega.co.nz link info info = self.api_response(link=node, m="info") - # get crypted file URL + #: get crypted file URL dl = self.api_response(link=node, m="dl") - # TODO: map error codes, implement password protection - # if info['pass'] is True: - # crypted_file_key, md5_file_key = info['key'].split("#") + #@TODO: map error codes, implement password protection + # if info['pass'] is True: + # crypted_file_key, md5_file_key = info['key'].split("#") key = self.b64_decode(info['key']) @@ -55,5 +55,5 @@ class MegacrypterCom(MegaCoNz): self.decryptFile(key) - # Everything is finished and final name can be set + #: Everything is finished and final name can be set pyfile.name = info['name'] -- 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/MegacrypterCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/MegacrypterCom.py') diff --git a/module/plugins/hoster/MegacrypterCom.py b/module/plugins/hoster/MegacrypterCom.py index 27c3c7253..7152a1cbc 100644 --- a/module/plugins/hoster/MegacrypterCom.py +++ b/module/plugins/hoster/MegacrypterCom.py @@ -10,7 +10,7 @@ from module.plugins.hoster.MegaCoNz import MegaCoNz class MegacrypterCom(MegaCoNz): __name__ = "MegacrypterCom" __type__ = "hoster" - __version__ = "0.22" + __version__ = "0.23" __pattern__ = r'https?://\w{0,10}\.?megacrypter\.com/[\w!-]+' @@ -27,9 +27,9 @@ class MegacrypterCom(MegaCoNz): """ Dispatch a call to the api, see megacrypter.com/api_doc """ - self.logDebug("JSON request: " + json_dumps(kwargs)) + self.log_debug("JSON request: " + json_dumps(kwargs)) res = self.load(self.API_URL, post=json_dumps(kwargs)) - self.logDebug("API Response: " + res) + self.log_debug("API Response: " + res) return json_loads(res) @@ -53,7 +53,7 @@ class MegacrypterCom(MegaCoNz): self.download(dl['url']) - self.decryptFile(key) + self.decrypt_file(key) #: Everything is finished and final name can be set pyfile.name = info['name'] -- 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/MegacrypterCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/MegacrypterCom.py') diff --git a/module/plugins/hoster/MegacrypterCom.py b/module/plugins/hoster/MegacrypterCom.py index 7152a1cbc..e3d1c9b9e 100644 --- a/module/plugins/hoster/MegacrypterCom.py +++ b/module/plugins/hoster/MegacrypterCom.py @@ -34,18 +34,18 @@ class MegacrypterCom(MegaCoNz): def process(self, pyfile): - #: match is guaranteed because plugin was chosen to handle url + #: Match is guaranteed because plugin was chosen to handle url node = re.match(self.__pattern__, pyfile.url).group(0) #: get Mega.co.nz link info info = self.api_response(link=node, m="info") - #: get crypted file URL + #: Get crypted file URL dl = self.api_response(link=node, m="dl") #@TODO: map error codes, implement password protection - # if info['pass'] is True: - # crypted_file_key, md5_file_key = info['key'].split("#") + # if info['pass'] is True: + # crypted_file_key, md5_file_key = info['key'].split("#") key = self.b64_decode(info['key']) -- 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/MegacrypterCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/MegacrypterCom.py') diff --git a/module/plugins/hoster/MegacrypterCom.py b/module/plugins/hoster/MegacrypterCom.py index e3d1c9b9e..071a27cdb 100644 --- a/module/plugins/hoster/MegacrypterCom.py +++ b/module/plugins/hoster/MegacrypterCom.py @@ -11,6 +11,7 @@ class MegacrypterCom(MegaCoNz): __name__ = "MegacrypterCom" __type__ = "hoster" __version__ = "0.23" + __status__ = "stable" __pattern__ = r'https?://\w{0,10}\.?megacrypter\.com/[\w!-]+' -- 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/MegacrypterCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/MegacrypterCom.py') diff --git a/module/plugins/hoster/MegacrypterCom.py b/module/plugins/hoster/MegacrypterCom.py index 071a27cdb..a67dca5da 100644 --- a/module/plugins/hoster/MegacrypterCom.py +++ b/module/plugins/hoster/MegacrypterCom.py @@ -11,7 +11,7 @@ class MegacrypterCom(MegaCoNz): __name__ = "MegacrypterCom" __type__ = "hoster" __version__ = "0.23" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'https?://\w{0,10}\.?megacrypter\.com/[\w!-]+' -- cgit v1.2.3