diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-03 00:22:23 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-03 00:22:23 +0200 |
commit | 6da22acfa81961473c8458de4b9a9723668be31f (patch) | |
tree | 2f8a4f4d781a4ca64ebc8da658e5d63a27d39699 /module | |
parent | gui: free space display (diff) | |
download | pyload-6da22acfa81961473c8458de4b9a9723668be31f.tar.xz |
little fixes
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hooks/UnRar.py | 3 | ||||
-rw-r--r-- | module/plugins/hoster/MegauploadCom.py | 14 | ||||
-rw-r--r-- | module/web/ServerThread.py | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/module/plugins/hooks/UnRar.py b/module/plugins/hooks/UnRar.py index faa06d179..9ee9b2d46 100644 --- a/module/plugins/hooks/UnRar.py +++ b/module/plugins/hooks/UnRar.py @@ -95,7 +95,7 @@ class UnRar(Hook): for fid, fname in files: pyfile = self.core.files.getFile(fid) - pyfile.setStatus("custom") + pyfile.setStatus("processing") def s(p): pyfile.alternativePercent = p @@ -134,4 +134,5 @@ class UnRar(Hook): finally: pyfile.alternativePercent = None pyfile.setStatus("finished") + pyfile.release() diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py index bacc7d98f..aee6ec3b2 100644 --- a/module/plugins/hoster/MegauploadCom.py +++ b/module/plugins/hoster/MegauploadCom.py @@ -72,7 +72,7 @@ class MegauploadCom(Hoster): for i in range(5): self.html[0] = self.load(self.pyfile.url) try: - url_captcha_html = re.search('(http://www.{,3}\.megaupload\.com/gencap.php\?.*\.gif)', self.html[0]).group(1) + url_captcha_html = re.search('(http://[\w\.]*?megaupload\.com/gencap.php\?.*\.gif)', self.html[0]).group(1) except: continue @@ -80,7 +80,7 @@ class MegauploadCom(Hoster): captchacode = re.search('name="captchacode" value="(.*)"', self.html[0]).group(1) megavar = re.search('name="megavar" value="(.*)">', self.html[0]).group(1) self.html[1] = self.load(self.pyfile.url, post={"captcha": captcha, "captchacode": captchacode, "megavar": megavar}) - if re.search(r"Waiting time before each download begins", self.html[1]) != None: + if re.search(r"Waiting time before each download begins", self.html[1]) is not None: break def get_file_url(self): @@ -94,17 +94,17 @@ class MegauploadCom(Hoster): def file_exists(self): self.download_html() - if re.search(r"Unfortunately, the link you have clicked is not available.", self.html[0]) != None or \ - re.search(r"Download limit exceeded", self.html[0]) != None: + if re.search(r"Unfortunately, the link you have clicked is not available.", self.html[0]) is not None or \ + re.search(r"Download limit exceeded", self.html[0]) is not None: return False - if re.search("The file you are trying to access is temporarily unavailable", self.html[0]) != None: + if re.search("The file you are trying to access is temporarily unavailable", self.html[0]) is not None: self.setWait(120) self.log.debug("%s: The file is temporarily not available. Waiting 2 minutes." % self.__name__) self.wait() self.download_html() - if re.search("The file you are trying to access is temporarily unavailable", self.html[0]) != None: - self.fail("Looks like the file is still not available. Retry downloading later, manually.") + if re.search("The file you are trying to access is temporarily unavailable", self.html[0]) is not None: + self.fail(_("Looks like the file is still not available. Retry downloading later, manually.")) return True diff --git a/module/web/ServerThread.py b/module/web/ServerThread.py index 59f3164f7..ef70babe6 100644 --- a/module/web/ServerThread.py +++ b/module/web/ServerThread.py @@ -156,7 +156,7 @@ class WebServer(threading.Thread): ssl.engine = "enable" ssl.pemfile = "%s" ssl.ca-file = "%s" - """ % ("ssl.pem" , self.core.config["ssl"]["cert"]) ) + """ % (abspath("ssl.pem") , abspath(self.core.config["ssl"]["cert"])) ) else: content = content.replace("%(ssl)", "") new_config = file(join("servers", "lighttpd.conf"), "wb") |