From 5d6b8fdb79eb10b3b96cb265860d0d02d112af60 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jul 2013 03:20:29 +0200 Subject: fixed log api call for several plugins --- module/plugins/hoster/ARD.py | 4 ++-- module/plugins/hoster/AlldebridCom.py | 4 ++-- module/plugins/hoster/DepositfilesCom.py | 8 +++---- module/plugins/hoster/FileApeCom.py | 4 ++-- module/plugins/hoster/FilesMailRu.py | 4 ++-- module/plugins/hoster/NetloadIn.py | 36 ++++++++++++++++---------------- module/plugins/hoster/RapidshareCom.py | 22 +++++++++---------- module/plugins/hoster/RealdebridCom.py | 6 +++--- module/plugins/hoster/RehostTo.py | 6 +++--- module/plugins/hoster/ShareplaceCom.py | 4 ++-- module/plugins/hoster/UlozTo.py | 4 ++-- module/plugins/hoster/UploadedTo.py | 6 +++--- module/plugins/hoster/UploadheroCom.py | 6 +++--- module/plugins/hoster/UploadingCom.py | 4 ++-- module/plugins/hoster/VeehdCom.py | 4 ++-- module/plugins/hoster/WuploadCom.py | 4 ++-- module/plugins/hoster/Xdcc.py | 14 ++++++------- module/plugins/hoster/YourfilesTo.py | 4 ++-- 18 files changed, 72 insertions(+), 72 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/ARD.py b/module/plugins/hoster/ARD.py index 5ab65cd4b..cda783091 100644 --- a/module/plugins/hoster/ARD.py +++ b/module/plugins/hoster/ARD.py @@ -39,7 +39,7 @@ class RTMP: class ARD(Hoster): __name__ = "ARD Mediathek" - __version__ = "0.1" + __version__ = "0.11" __pattern__ = r"http://www\.ardmediathek\.de/.*" __config__ = [] @@ -73,7 +73,7 @@ class ARD(Hoster): chown(location, uid, gid) except Exception, e: - self.log.warning(_("Setting User and Group failed: %s") % str(e)) + self.logWarning(_("Setting User and Group failed: %s") % str(e)) output_file = save_join(location, save_path(pyfile.name)) + os.path.splitext(playpath)[1] diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py index efc96ff28..0b8b70d06 100644 --- a/module/plugins/hoster/AlldebridCom.py +++ b/module/plugins/hoster/AlldebridCom.py @@ -10,7 +10,7 @@ from module.utils import parseFileSize class AlldebridCom(Hoster): __name__ = "AlldebridCom" - __version__ = "0.31" + __version__ = "0.32" __type__ = "hoster" __pattern__ = r"https?://.*alldebrid\..*" @@ -37,7 +37,7 @@ class AlldebridCom(Hoster): self.logError("Please enter your AllDebrid account or deactivate this plugin") self.fail("No AllDebrid account provided") - self.log.debug("AllDebrid: Old URL: %s" % pyfile.url) + self.logDebug("AllDebrid: Old URL: %s" % pyfile.url) if re.match(self.__pattern__, pyfile.url): new_url = pyfile.url else: diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index 850812c5d..ee5fdf6af 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -11,7 +11,7 @@ class DepositfilesCom(SimpleHoster): __name__ = "DepositfilesCom" __type__ = "hoster" __pattern__ = r"http://[\w\.]*?(depositfiles\.com|dfiles\.eu)(/\w{1,3})?/files/[\w]+" - __version__ = "0.43" + __version__ = "0.44" __description__ = """Depositfiles.com Download Hoster""" __author_name__ = ("spoob", "zoidberg") __author_mail__ = ("spoob@pyload.org", "zoidberg@mujmail.cz") @@ -35,7 +35,7 @@ class DepositfilesCom(SimpleHoster): if re.search(self.FILE_OFFLINE_PATTERN, self.html): self.offline() if re.search(r'File is checked, please try again in a minute.', self.html) is not None: - self.log.info("DepositFiles.com: The file is being checked. Waiting 1 minute.") + self.logInfo("DepositFiles.com: The file is being checked. Waiting 1 minute.") self.setWait(61) self.wait() self.retry() @@ -43,7 +43,7 @@ class DepositfilesCom(SimpleHoster): wait = re.search(r'html_download_api-limit_interval\">(\d+)', self.html) if wait: wait_time = int(wait.group(1)) - self.log.info( "%s: Traffic used up. Waiting %d seconds." % (self.__name__, wait_time) ) + self.logInfo( "%s: Traffic used up. Waiting %d seconds." % (self.__name__, wait_time) ) self.setWait(wait_time) self.wantReconnect = True self.wait() @@ -52,7 +52,7 @@ class DepositfilesCom(SimpleHoster): wait = re.search(r'>Try in (\d+) minutes or use GOLD account', self.html) if wait: wait_time = int(wait.group(1)) - self.log.info( "%s: All free slots occupied. Waiting %d minutes." % (self.__name__, wait_time) ) + self.logInfo( "%s: All free slots occupied. Waiting %d minutes." % (self.__name__, wait_time) ) self.setWait(wait_time * 60, False) wait = re.search(r'Please wait (\d+) sec', self.html) diff --git a/module/plugins/hoster/FileApeCom.py b/module/plugins/hoster/FileApeCom.py index 1f933e776..f5182a788 100644 --- a/module/plugins/hoster/FileApeCom.py +++ b/module/plugins/hoster/FileApeCom.py @@ -9,7 +9,7 @@ class FileApeCom(Hoster): __name__ = "FileApeCom" __type__ = "hoster" __pattern__ = r"http://(www\.)?fileape\.com/(index\.php\?act=download\&id=|dl/)\w+" - __version__ = "0.1" + __version__ = "0.11" __description__ = """FileApe Download Hoster""" __author_name__ = ("espes") @@ -58,5 +58,5 @@ class FileApeCom(Hoster): check = self.checkDownload({"exp": "Download ticket expired"}) if check == "exp": - self.log.info("Ticket expired, retrying...") + self.logInfo("Ticket expired, retrying...") self.retry() \ No newline at end of file diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py index 5f36de3c4..8c6a183c7 100644 --- a/module/plugins/hoster/FilesMailRu.py +++ b/module/plugins/hoster/FilesMailRu.py @@ -32,7 +32,7 @@ class FilesMailRu(Hoster): __name__ = "FilesMailRu" __type__ = "hoster" __pattern__ = r"http://files\.mail\.ru/.*" - __version__ = "0.3" + __version__ = "0.31" __description__ = """Files.Mail.Ru One-Klick Hoster""" __author_name__ = ("oZiRiz") __author_mail__ = ("ich@oziriz.de") @@ -96,5 +96,5 @@ class FilesMailRu(Hoster): # (Loading 100MB in to ram is not an option) check = self.checkDownload({"html": "Your download is being prepared.<" in page: - self.log.debug("Netload: We will prepare your download") + self.logDebug("Netload: We will prepare your download") self.final_wait(page) return True if ">An access request has been made from IP address <" in page: wait = self.get_wait_time(page) if wait == 0: - self.log.debug("Netload: Wait was 0 setting 30") + self.logDebug("Netload: Wait was 0 setting 30") wait = 30 - self.log.info(_("Netload: waiting between downloads %d s." % wait)) + self.logInfo(_("Netload: waiting between downloads %d s." % wait)) self.wantReconnect = True self.setWait(wait) self.wait() @@ -187,7 +187,7 @@ class NetloadIn(Hoster): return self.download_html() - self.log.debug("Netload: Trying to find captcha") + self.logDebug("Netload: Trying to find captcha") try: url_captcha_html = "http://netload.in/" + re.search('(index.php\?id=10&.*&captcha=1)', page).group(1).replace("amp;", "") @@ -199,7 +199,7 @@ class NetloadIn(Hoster): page = self.load(url_captcha_html, cookies=True) captcha_url = "http://netload.in/" + re.search('(share/includes/captcha.php\?t=\d*)', page).group(1) except: - self.log.debug("Netload: Could not find captcha, try again from beginning") + self.logDebug("Netload: Could not find captcha, try again from beginning") captchawaited = False continue @@ -208,7 +208,7 @@ class NetloadIn(Hoster): wait = self.get_wait_time(page) if i == 0: self.pyfile.waitUntil = time() # dont wait contrary to time on website else: self.pyfile.waitUntil = t - self.log.info(_("Netload: waiting for captcha %d s.") % (self.pyfile.waitUntil - time())) + self.logInfo(_("Netload: waiting for captcha %d s.") % (self.pyfile.waitUntil - time())) #self.setWait(wait) self.wait() captchawaited = True @@ -226,12 +226,12 @@ class NetloadIn(Hoster): if attempt is not None: return attempt.group(1) else: - self.log.debug("Netload: Backup try for final link") + self.logDebug("Netload: Backup try for final link") file_url_pattern = r"Click here" attempt = re.search(file_url_pattern, page) return "http://netload.in/"+attempt.group(1) except: - self.log.debug("Netload: Getting final link failed") + self.logDebug("Netload: Getting final link failed") return None def get_wait_time(self, page): @@ -240,7 +240,7 @@ class NetloadIn(Hoster): def proceed(self, url): - self.log.debug("Netload: Downloading..") + self.logDebug("Netload: Downloading..") self.download(url, disposition=True) diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py index 8b31dd42c..cbbf5115a 100644 --- a/module/plugins/hoster/RapidshareCom.py +++ b/module/plugins/hoster/RapidshareCom.py @@ -50,7 +50,7 @@ class RapidshareCom(Hoster): __name__ = "RapidshareCom" __type__ = "hoster" __pattern__ = r"https?://[\w\.]*?rapidshare.com/(?:files/(?P\d*?)/(?P[^?]+)|#!download\|(?:\w+)\|(?P\d+)\|(?P[^|]+))" - __version__ = "1.38" + __version__ = "1.39" __description__ = """Rapidshare.com Download Hoster""" __config__ = [["server", "Cogent;Deutsche Telekom;Level(3);Level(3) #2;GlobalCrossing;Level(3) #3;Teleglobe;GlobalCrossing #2;TeliaSonera #2;Teleglobe #2;TeliaSonera #3;TeliaSonera", "Preferred Server", "None"]] __author_name__ = ("spoob", "RaNaN", "mkaay") @@ -93,7 +93,7 @@ class RapidshareCom(Hoster): self.handleFree() elif self.api_data["status"] == "2": - self.log.info(_("Rapidshare: Traffic Share (direct download)")) + self.logInfo(_("Rapidshare: Traffic Share (direct download)")) self.pyfile.name = self.get_file_name() self.download(self.pyfile.url, get={"directstart":1}) @@ -113,24 +113,24 @@ class RapidshareCom(Hoster): #tmp = "#!download|%(server)s|%(id)s|%(name)s|%(size)s" download = "http://%(host)s/cgi-bin/rsapi.cgi?sub=download&editparentlocation=0&bin=1&fileid=%(id)s&filename=%(name)s&dlauth=%(auth)s" % self.dl_dict - self.log.debug("RS API Request: %s" % download) + self.logDebug("RS API Request: %s" % download) self.download(download, ref=False) check = self.checkDownload({"ip" : "You need RapidPro to download more files from your IP address", "auth" : "Download auth invalid"}) if check == "ip": self.setWait(60) - self.log.info(_("Already downloading from this ip address, waiting 60 seconds")) + self.logInfo(_("Already downloading from this ip address, waiting 60 seconds")) self.wait() self.handleFree() elif check == "auth": - self.log.info(_("Invalid Auth Code, download will be restarted")) + self.logInfo(_("Invalid Auth Code, download will be restarted")) self.offset += 5 self.handleFree() def handlePremium(self): info = self.account.getAccountInfo(self.user, True) - self.log.debug("%s: Use Premium Account" % self.__name__) + self.logDebug("%s: Use Premium Account" % self.__name__) url = self.api_data["mirror"] self.download(url, get={"directstart":1}) @@ -144,7 +144,7 @@ class RapidshareCom(Hoster): api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi" api_param_file = {"sub": "checkfiles", "incmd5": "1", "files": self.id, "filenames": self.name} src = self.load(api_url_base, cookies=False, get=api_param_file).strip() - self.log.debug("RS INFO API: %s" % src) + self.logDebug("RS INFO API: %s" % src) if src.startswith("ERROR"): return fields = src.split(",") @@ -178,19 +178,19 @@ class RapidshareCom(Hoster): prepare = "https://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=download&fileid=%(id)s&filename=%(name)s&try=1&cbf=RSAPIDispatcher&cbid=1" % {"name": name, "id" : id} - self.log.debug("RS API Request: %s" % prepare) + self.logDebug("RS API Request: %s" % prepare) result = self.load(prepare, ref=False) - self.log.debug("RS API Result: %s" % result) + self.logDebug("RS API Result: %s" % result) between_wait = re.search("You need to wait (\d+) seconds", result) if "You need RapidPro to download more files from your IP address" in result: self.setWait(60) - self.log.info(_("Already downloading from this ip address, waiting 60 seconds")) + self.logInfo(_("Already downloading from this ip address, waiting 60 seconds")) self.wait() elif "Too many users downloading from this server right now" in result or "All free download slots are full" in result: self.setWait(120) - self.log.info(_("RapidShareCom: No free slots")) + self.logInfo(_("RapidShareCom: No free slots")) self.wait() elif "This file is too big to download it for free" in result: self.fail(_("You need a premium account for this file")) diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py index ff4843afd..54cbf9b32 100644 --- a/module/plugins/hoster/RealdebridCom.py +++ b/module/plugins/hoster/RealdebridCom.py @@ -12,7 +12,7 @@ from module.plugins.Hoster import Hoster class RealdebridCom(Hoster): __name__ = "RealdebridCom" - __version__ = "0.49" + __version__ = "0.50" __type__ = "hoster" __pattern__ = r"https?://.*real-debrid\..*" @@ -40,7 +40,7 @@ class RealdebridCom(Hoster): self.logError(_("Please enter your Real-debrid account or deactivate this plugin")) self.fail("No Real-debrid account provided") - self.log.debug("Real-Debrid: Old URL: %s" % pyfile.url) + self.logDebug("Real-Debrid: Old URL: %s" % pyfile.url) if re.match(self.__pattern__, pyfile.url): new_url = pyfile.url else: @@ -71,7 +71,7 @@ class RealdebridCom(Hoster): else: new_url = new_url.replace("https://", "http://") - self.log.debug("Real-Debrid: New URL: %s" % new_url) + self.logDebug("Real-Debrid: New URL: %s" % new_url) if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown") or pyfile.name.endswith('..'): #only use when name wasnt already set diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 141dcb8c8..e306823a0 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -6,7 +6,7 @@ from module.plugins.Hoster import Hoster class RehostTo(Hoster): __name__ = "RehostTo" - __version__ = "0.11" + __version__ = "0.12" __type__ = "hoster" __pattern__ = r"https?://.*rehost.to\..*" __description__ = """rehost.com hoster plugin""" @@ -22,13 +22,13 @@ class RehostTo(Hoster): def process(self, pyfile): if not self.account: - self.log.error(_("Please enter your rehost.to account or deactivate this plugin")) + self.logError(_("Please enter your rehost.to account or deactivate this plugin")) self.fail("No rehost.to account provided") data = self.account.getAccountInfo(self.user) long_ses = data["long_ses"] - self.log.debug("Rehost.to: Old URL: %s" % pyfile.url) + self.logDebug("Rehost.to: Old URL: %s" % pyfile.url) new_url = "http://rehost.to/process_download.php?user=cookie&pass=%s&dl=%s" % (long_ses, quote(pyfile.url, "")) #raise timeout to 2min diff --git a/module/plugins/hoster/ShareplaceCom.py b/module/plugins/hoster/ShareplaceCom.py index 7f0dee0e5..24536d351 100644 --- a/module/plugins/hoster/ShareplaceCom.py +++ b/module/plugins/hoster/ShareplaceCom.py @@ -9,7 +9,7 @@ class ShareplaceCom(Hoster): __name__ = "ShareplaceCom" __type__ = "hoster" __pattern__ = r"(http://)?(www\.)?shareplace\.(com|org)/\?[a-zA-Z0-9]+" - __version__ = "0.1" + __version__ = "0.11" __description__ = """Shareplace.com Download Hoster""" __author_name__ = ("ACCakut, based on YourfilesTo by jeix and skydancer") __author_mail__ = ("none") @@ -31,7 +31,7 @@ class ShareplaceCom(Hoster): wait_time = self.get_waiting_time() self.setWait(wait_time) - self.log.debug("%s: Waiting %d seconds." % (self.__name__,wait_time)) + self.logDebug("%s: Waiting %d seconds." % (self.__name__,wait_time)) self.wait() def get_waiting_time(self): diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index 5c38fdaad..1c3891eb1 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -27,7 +27,7 @@ class UlozTo(SimpleHoster): __name__ = "UlozTo" __type__ = "hoster" __pattern__ = r"http://(\w*\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj.cz|zachowajto.pl)/(?:live/)?(?P\w+/[^/?]*)" - __version__ = "0.92" + __version__ = "0.93" __description__ = """uloz.to""" __author_name__ = ("zoidberg") @@ -101,7 +101,7 @@ class UlozTo(SimpleHoster): captcha_id = inputs[captcha_id_field] captcha_text = self.decryptCaptcha("http://img.uloz.to/captcha/%s.png" % captcha_id) - self.log.debug(' CAPTCHA ID:' + captcha_id + ' CAPTCHA TEXT:' + captcha_text) + self.logDebug(' CAPTCHA ID:' + captcha_id + ' CAPTCHA TEXT:' + captcha_text) """ self.setStorage("captcha_id", captcha_id) diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py index 520111369..f38336773 100644 --- a/module/plugins/hoster/UploadedTo.py +++ b/module/plugins/hoster/UploadedTo.py @@ -88,7 +88,7 @@ class UploadedTo(Hoster): __name__ = "UploadedTo" __type__ = "hoster" __pattern__ = r"https?://[\w\.-]*?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P\w+)" - __version__ = "0.70" + __version__ = "0.71" __description__ = """Uploaded.net Download Hoster""" __author_name__ = ("spoob", "mkaay", "zoidberg", "netpok", "stickell") __author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de", "zoidberg@mujmail.cz", "netpok@gmail.com", "l.stickell@yahoo.it") @@ -154,10 +154,10 @@ class UploadedTo(Hoster): def handlePremium(self): info = self.account.getAccountInfo(self.user, True) - self.log.debug("%(name)s: Use Premium Account (%(left)sGB left)" % {"name": self.__name__, + self.logDebug("%(name)s: Use Premium Account (%(left)sGB left)" % {"name": self.__name__, "left": info["trafficleft"] / 1024 / 1024}) if int(self.data[1]) / 1024 > info["trafficleft"]: - self.log.info(_("%s: Not enough traffic left" % self.__name__)) + self.logInfo(_("%s: Not enough traffic left" % self.__name__)) self.account.empty(self.user) self.resetAccount() self.fail(_("Traffic exceeded")) diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py index a2348b9f9..65d6cc4e9 100644 --- a/module/plugins/hoster/UploadheroCom.py +++ b/module/plugins/hoster/UploadheroCom.py @@ -26,7 +26,7 @@ class UploadheroCom(SimpleHoster): __name__ = "UploadheroCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?uploadhero\.com?/dl/\w+" - __version__ = "0.13" + __version__ = "0.14" __description__ = """UploadHero.com plugin""" __author_name__ = ("mcmyst", "zoidberg") __author_mail__ = ("mcmyst@hotmail.fr", "zoidberg@mujmail.cz") @@ -67,10 +67,10 @@ class UploadheroCom(SimpleHoster): self.download(download_url) def handlePremium(self): - self.log.debug("%s: Use Premium Account" % self.__name__) + self.logDebug("%s: Use Premium Account" % self.__name__) self.html = self.load(self.pyfile.url) link = re.search(self.DOWNLOAD_URL_PATTERN, self.html).group(1) - self.log.debug("Downloading link : '%s'" % link) + self.logDebug("Downloading link : '%s'" % link) self.download(link) def checkErrors(self): diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py index 4a157a787..3037cfd20 100644 --- a/module/plugins/hoster/UploadingCom.py +++ b/module/plugins/hoster/UploadingCom.py @@ -26,7 +26,7 @@ class UploadingCom(SimpleHoster): __name__ = "UploadingCom" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?uploading\.com/files/(?:get/)?(?P[\w\d]+)" - __version__ = "0.32" + __version__ = "0.33" __description__ = """Uploading.Com File Download Hoster""" __author_name__ = ("jeix", "mkaay", "zoidberg") __author_mail__ = ("jeix@hasnomail.de", "mkaay@mkaay.de", "zoidberg@mujmail.cz") @@ -80,7 +80,7 @@ class UploadingCom(SimpleHoster): response = json_loads(self.load(ajax_url, post = {'action': 'second_page', 'code': self.file_info['ID']})) if 'answer' in response and 'wait_time' in response['answer']: wait_time = int(response['answer']['wait_time']) - self.log.info("%s: Waiting %d seconds." % (self.__name__, wait_time)) + self.logInfo("%s: Waiting %d seconds." % (self.__name__, wait_time)) self.setWait(wait_time) self.wait() else: diff --git a/module/plugins/hoster/VeehdCom.py b/module/plugins/hoster/VeehdCom.py index d4422afc3..4486eb84a 100644 --- a/module/plugins/hoster/VeehdCom.py +++ b/module/plugins/hoster/VeehdCom.py @@ -11,13 +11,13 @@ class VeehdCom(Hoster): ('filename_spaces', 'bool', "Allow spaces in filename", 'False'), ('replacement_char', 'str', "Filename replacement character", '_'), ] - __version__ = '0.21' + __version__ = '0.22' __description__ = """Veehd.com Download Hoster""" __author_name__ = ('cat') __author_mail__ = ('cat@pyload') def _debug(self, msg): - self.log.debug('[%s] %s' % (self.__name__, msg)) + self.logDebug('[%s] %s' % (self.__name__, msg)) def setup(self): self.html = None diff --git a/module/plugins/hoster/WuploadCom.py b/module/plugins/hoster/WuploadCom.py index 5bc5e9ac7..3dab1b1bb 100644 --- a/module/plugins/hoster/WuploadCom.py +++ b/module/plugins/hoster/WuploadCom.py @@ -47,7 +47,7 @@ class WuploadCom(Hoster): __name__ = "WuploadCom" __type__ = "hoster" __pattern__ = r"http://[\w\.]*?wupload\..*?/file/(([a-z][0-9]+/)?[0-9]+)(/.*)?" - __version__ = "0.20" + __version__ = "0.21" __description__ = """Wupload com""" __author_name__ = ("jeix", "paulking") __author_mail__ = ("jeix@hasnomail.de", "") @@ -113,7 +113,7 @@ class WuploadCom(Hoster): def getDomain(self): result = json_loads( self.load(self.API_ADDRESS + "/utility?method=getWuploadDomainForCurrentIp&format=json", decode=True)) - self.log.debug("%s: response to get domain %s" % (self.__name__, result)) + self.logDebug("%s: response to get domain %s" % (self.__name__, result)) return result["FSApi_Utility"]["getWuploadDomainForCurrentIp"]["response"] def downloadPremium(self): diff --git a/module/plugins/hoster/Xdcc.py b/module/plugins/hoster/Xdcc.py index 3e66b966a..92b77f73a 100644 --- a/module/plugins/hoster/Xdcc.py +++ b/module/plugins/hoster/Xdcc.py @@ -32,7 +32,7 @@ from module.plugins.Hoster import Hoster class Xdcc(Hoster): __name__ = "Xdcc" - __version__ = "0.31" + __version__ = "0.32" __pattern__ = r'xdcc://.*?(/#?.*?)?/.*?/#?\d+/?' # xdcc://irc.Abjects.net/#channel/[XDCC]|Shit/#0004/ __type__ = "hoster" __config__ = [ @@ -59,7 +59,7 @@ class Xdcc(Hoster): for i in range(0,3): try: nmn = self.doDownload(pyfile.url) - self.log.debug("%s: Download of %s finished." % (self.__name__, nmn)) + self.logDebug("%s: Download of %s finished." % (self.__name__, nmn)) return except socket.error, e: if hasattr(e, "errno"): @@ -68,7 +68,7 @@ class Xdcc(Hoster): errno = e.args[0] if errno in (10054,): - self.log.debug("XDCC: Server blocked our ip, retry in 5 min") + self.logDebug("XDCC: Server blocked our ip, retry in 5 min") self.setWait(300) self.wait() continue @@ -176,10 +176,10 @@ class Xdcc(Hoster): if nick == msg["target"][0:len(nick)] and "PRIVMSG" == msg["action"]: if msg["text"] == "\x01VERSION\x01": - self.log.debug("XDCC: Sending CTCP VERSION.") + self.logDebug("XDCC: Sending CTCP VERSION.") sock.send("NOTICE %s :%s\r\n" % (msg['origin'], "pyLoad! IRC Interface")) elif msg["text"] == "\x01TIME\x01": - self.log.debug("Sending CTCP TIME.") + self.logDebug("Sending CTCP TIME.") sock.send("NOTICE %s :%d\r\n" % (msg['origin'], time.time())) elif msg["text"] == "\x01LAG\x01": pass # don't know how to answer @@ -212,12 +212,12 @@ class Xdcc(Hoster): self.pyfile.name = packname filename = save_join(location, packname) - self.log.info("XDCC: Downloading %s from %s:%d" % (packname, ip, port)) + self.logInfo("XDCC: Downloading %s from %s:%d" % (packname, ip, port)) self.pyfile.setStatus("downloading") newname = self.req.download(ip, port, filename, sock, self.pyfile.setProgress) if newname and newname != filename: - self.log.info("%(name)s saved as %(newname)s" % {"name": self.pyfile.name, "newname": newname}) + self.logInfo("%(name)s saved as %(newname)s" % {"name": self.pyfile.name, "newname": newname}) filename = newname # kill IRC socket diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py index b67ccb68d..c2183f8a8 100644 --- a/module/plugins/hoster/YourfilesTo.py +++ b/module/plugins/hoster/YourfilesTo.py @@ -9,7 +9,7 @@ class YourfilesTo(Hoster): __name__ = "YourfilesTo" __type__ = "hoster" __pattern__ = r"(http://)?(www\.)?yourfiles\.(to|biz)/\?d=[a-zA-Z0-9]+" - __version__ = "0.2" + __version__ = "0.21" __description__ = """Youfiles.to Download Hoster""" __author_name__ = ("jeix", "skydancer") __author_mail__ = ("jeix@hasnomail.de", "skydancer@hasnomail.de") @@ -31,7 +31,7 @@ class YourfilesTo(Hoster): wait_time = self.get_waiting_time() self.setWait(wait_time) - self.log.debug("%s: Waiting %d seconds." % (self.__name__,wait_time)) + self.logDebug("%s: Waiting %d seconds." % (self.__name__,wait_time)) self.wait() def get_waiting_time(self): -- cgit v1.2.3