diff options
Diffstat (limited to 'module/plugins/hoster/RPNetBiz.py')
-rw-r--r-- | module/plugins/hoster/RPNetBiz.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/module/plugins/hoster/RPNetBiz.py b/module/plugins/hoster/RPNetBiz.py index 2e6271ac6..a548e1670 100644 --- a/module/plugins/hoster/RPNetBiz.py +++ b/module/plugins/hoster/RPNetBiz.py @@ -9,7 +9,7 @@ from module.common.json_layer import json_loads class RPNetBiz(MultiHoster): __name__ = "RPNetBiz" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __pattern__ = r'https?://.+rpnet\.biz' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -21,10 +21,10 @@ class RPNetBiz(MultiHoster): def setup(self): - self.chunkLimit = -1 + self.chunk_limit = -1 - def handlePremium(self, pyfile): + def handle_premium(self, pyfile): user, data = self.account.selectAccount() #: Get the download link @@ -34,36 +34,36 @@ class RPNetBiz(MultiHoster): "action" : "generate", "links" : pyfile.url}) - self.logDebug("JSON data: %s" % res) + self.log_debug("JSON data: %s" % res) link_status = json_loads(res)['links'][0] #: get the first link... since we only queried one #: Check if we only have an id as a HDD link if 'id' in link_status: - self.logDebug("Need to wait at least 30 seconds before requery") - self.setWait(30) #: wait for 30 seconds + self.log_debug("Need to wait at least 30 seconds before requery") + self.set_wait(30) #: wait for 30 seconds self.wait() #: Lets query the server again asking for the status on the link, #: we need to keep doing this until we reach 100 max_tries = 30 my_try = 0 while (my_try <= max_tries): - self.logDebug("Try: %d ; Max Tries: %d" % (my_try, max_tries)) + self.log_debug("Try: %d ; Max Tries: %d" % (my_try, max_tries)) res = self.load("https://premium.rpnet.biz/client_api.php", get={"username": user, "password": data['password'], "action": "downloadInformation", "id": link_status['id']}) - self.logDebug("JSON data hdd query: %s" % res) + self.log_debug("JSON data hdd query: %s" % res) download_status = json_loads(res)['download'] if download_status['status'] == '100': link_status['generated'] = download_status['rpnet_link'] - self.logDebug("Successfully downloaded to rpnet HDD: %s" % link_status['generated']) + self.log_debug("Successfully downloaded to rpnet HDD: %s" % link_status['generated']) break else: - self.logDebug("At %s%% for the file download" % download_status['status']) + self.log_debug("At %s%% for the file download" % download_status['status']) - self.setWait(30) + self.set_wait(30) self.wait() my_try += 1 |