diff options
Diffstat (limited to 'module/plugins/internal')
23 files changed, 98 insertions, 79 deletions
diff --git a/module/plugins/internal/Account.py b/module/plugins/internal/Account.py index 96f1cb533..158a5c7bc 100644 --- a/module/plugins/internal/Account.py +++ b/module/plugins/internal/Account.py @@ -17,7 +17,7 @@ class Account(Plugin): __name__ = "Account" __type__ = "account" __version__ = "0.05" - __status__ = "stable" + __status__ = "testing" __description__ = """Base account plugin""" __license__ = "GPLv3" @@ -170,7 +170,7 @@ class Account(Plugin): try: infos = self.load_account_info(name, self.req) - if not type(infos) == dict: + if not type(infos) is dict: raise Exception("Wrong return format") except Exception, e: @@ -279,7 +279,7 @@ class Account(Plugin): if self.infos[user]['validuntil'] > 0 and time.time() > self.infos[user]['validuntil']: continue if "trafficleft" in self.infos[user]: - if self.infos[user]['trafficleft'] == 0: + if self.infos[user]['trafficleft'] is 0: continue usable.append((user, data)) diff --git a/module/plugins/internal/Addon.py b/module/plugins/internal/Addon.py index b29aa0936..23512d7c4 100644 --- a/module/plugins/internal/Addon.py +++ b/module/plugins/internal/Addon.py @@ -26,7 +26,7 @@ class Addon(Plugin): __name__ = "Addon" __type__ = "hook" #@TODO: Change to `addon` in 0.4.10 __version__ = "0.01" - __status__ = "stable" + __status__ = "testing" __config__ = [] #: [("name", "type", "desc", "default")] __threaded__ = [] #@TODO: Remove in 0.4.10 diff --git a/module/plugins/internal/Captcha.py b/module/plugins/internal/Captcha.py index 1345f1784..89cace612 100644 --- a/module/plugins/internal/Captcha.py +++ b/module/plugins/internal/Captcha.py @@ -9,8 +9,8 @@ from module.plugins.internal.Plugin import Plugin class Captcha(Plugin): __name__ = "Captcha" __type__ = "captcha" - __version__ = "0.02" - __status__ = "stable" + __version__ = "0.31" + __status__ = "testing" __description__ = """Base anti-captcha plugin""" __license__ = "GPLv3" @@ -27,8 +27,8 @@ class Captcha(Plugin): self.init() - def _log(self, type, args): - return super(Captcha, self)._log(type, (self.plugin.__name__,) + args) + def _log(self, level, args): + return self.plugin._log(level, (self.__name__,) + args) def init(self): @@ -119,12 +119,16 @@ class Captcha(Plugin): def invalid(self): + if not self.task: + return + self.log_error(_("Invalid captcha")) - if self.task: - self.task.invalid() + self.task.invalid() def correct(self): + if not self.task: + return + self.log_info(_("Correct captcha")) - if self.task: - self.task.correct() + self.task.correct() diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py index 05af8ccec..971158a36 100644 --- a/module/plugins/internal/CaptchaService.py +++ b/module/plugins/internal/CaptchaService.py @@ -7,7 +7,7 @@ class Captcha(Plugin): __name__ = "Captcha" __type__ = "captcha" __version__ = "0.31" - __status__ = "stable" + __status__ = "testing" __description__ = """Base anti-captcha service plugin""" __license__ = "GPLv3" diff --git a/module/plugins/internal/Container.py b/module/plugins/internal/Container.py index ce9426b0d..cc732247e 100644 --- a/module/plugins/internal/Container.py +++ b/module/plugins/internal/Container.py @@ -14,7 +14,7 @@ class Container(Crypter): __name__ = "Container" __type__ = "container" __version__ = "0.05" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'^unmatchable$' __config__ = [] #: [("name", "type", "desc", "default")] @@ -39,6 +39,11 @@ class Container(Crypter): self._create_packages() + #: Deprecated method, use `_load2disk` instead + def loadToDisk(self, *args, **kwargs): + return self._load2disk(*args, **kwargs) + + def _load2disk(self): """ Loads container to disk if its stored remotely and overwrite url, @@ -63,6 +68,11 @@ class Container(Crypter): self.fail(_("File not exists")) + #: Deprecated method, use `delete_tmp` instead + def deleteTmp(self, *args, **kwargs): + return self.delete_tmp(*args, **kwargs) + + def delete_tmp(self): if not self.pyfile.name.startswith("tmp_"): return diff --git a/module/plugins/internal/Crypter.py b/module/plugins/internal/Crypter.py index 627c198e1..715791949 100644 --- a/module/plugins/internal/Crypter.py +++ b/module/plugins/internal/Crypter.py @@ -10,7 +10,7 @@ class Crypter(Hoster): __name__ = "Crypter" __type__ = "crypter" __version__ = "0.05" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'^unmatchable$' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), #: Overrides pyload.config.get("general", "folder_per_package") diff --git a/module/plugins/internal/DeadCrypter.py b/module/plugins/internal/DeadCrypter.py index 5232403b8..7d14f5378 100644 --- a/module/plugins/internal/DeadCrypter.py +++ b/module/plugins/internal/DeadCrypter.py @@ -7,7 +7,7 @@ class DeadCrypter(Crypter): __name__ = "DeadCrypter" __type__ = "crypter" __version__ = "0.08" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'^unmatchable$' diff --git a/module/plugins/internal/DeadHoster.py b/module/plugins/internal/DeadHoster.py index b0c179ed1..f8e68f2b3 100644 --- a/module/plugins/internal/DeadHoster.py +++ b/module/plugins/internal/DeadHoster.py @@ -7,7 +7,7 @@ class DeadHoster(Hoster): __name__ = "DeadHoster" __type__ = "hoster" __version__ = "0.18" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'^unmatchable$' diff --git a/module/plugins/internal/Extractor.py b/module/plugins/internal/Extractor.py index 7189ddc25..668207ea3 100644 --- a/module/plugins/internal/Extractor.py +++ b/module/plugins/internal/Extractor.py @@ -23,7 +23,7 @@ class Extractor(Plugin): __name__ = "Extractor" __type__ = "extractor" __version__ = "0.26" - __status__ = "stable" + __status__ = "testing" __description__ = """Base extractor plugin""" __license__ = "GPLv3" diff --git a/module/plugins/internal/Hook.py b/module/plugins/internal/Hook.py index c3b14ef73..fbd6934ce 100644 --- a/module/plugins/internal/Hook.py +++ b/module/plugins/internal/Hook.py @@ -7,7 +7,7 @@ class Hook(Addon): __name__ = "Hook" __type__ = "hook" __version__ = "0.10" - __status__ = "stable" + __status__ = "testing" __config__ = [] #: [("name", "type", "desc", "default")] diff --git a/module/plugins/internal/Hoster.py b/module/plugins/internal/Hoster.py index d26592718..1cc127522 100644 --- a/module/plugins/internal/Hoster.py +++ b/module/plugins/internal/Hoster.py @@ -13,12 +13,12 @@ if os.name != "nt": import grp import pwd -from module.plugins.internal import Captcha -from module.plugins.internal.Plugin import (Plugin, Abort, Fail, Reconnect, Retry, Skip +from module.plugins.internal.Captcha import Captcha +from module.plugins.internal.Plugin import (Plugin, Abort, Fail, Reconnect, Retry, Skip, chunks, encode, fixurl as _fixurl, replace_patterns, seconds_to_midnight, set_cookies, parse_html_form, parse_html_tag_attr_value, timestamp) -from module.utils import fs_decode, fs_encode, save_join as fs_join +from module.utils import fs_decode, fs_encode, save_join as fs_join, save_path as safe_filename #@TODO: Remove in 0.4.10 @@ -48,7 +48,7 @@ class Hoster(Plugin): __name__ = "Hoster" __type__ = "hoster" __version__ = "0.05" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'^unmatchable$' __config__ = [] #: [("name", "type", "desc", "default")] @@ -66,11 +66,11 @@ class Hoster(Plugin): self.info = {} #: Provide information in dict here #: Engage wan reconnection - self.want_reconnect = False + self.wantReconnect = False #@TODO: Change to `want_reconnect` in 0.4.10 #: Enable simultaneous processing of multiple downloads - self.multi_dl = True - self.limit_dl = 0 + self.multiDL = True #@TODO: Change to `multi_dl` in 0.4.10 + self.limitDL = 0 #@TODO: Change to `limit_dl` in 0.4.10 #: Chunk limit self.chunk_limit = 1 @@ -206,8 +206,8 @@ class Hoster(Plugin): def set_reconnect(self, reconnect): reconnect = bool(reconnect) - self.log_debug("Set wantReconnect to: %s (previous: %s)" % (reconnect, self.want_reconnect)) - self.want_reconnect = reconnect + self.log_debug("Set wantReconnect to: %s (previous: %s)" % (reconnect, self.wantReconnect)) + self.wantReconnect = reconnect def set_wait(self, seconds, reconnect=None): @@ -247,7 +247,7 @@ class Hoster(Plugin): pyfile.setStatus("waiting") self.log_info(_("Wait: %d seconds") % (pyfile.waitUntil - time.time()), - _("Reconnect: %s") % self.want_reconnect) + _("Reconnect: %s") % self.wantReconnect) if self.account: self.log_debug("Ignore reconnection due account logged") @@ -266,7 +266,7 @@ class Hoster(Plugin): if self.thread.m.reconnecting.isSet(): self.waiting = False - self.want_reconnect = False + self.wantReconnect = False raise Reconnect time.sleep(1) @@ -396,7 +396,7 @@ class Hoster(Plugin): filename = os.path.join(location, name) - self.pyload.addonManager.dispatchEvent("download-start", self.pyfile, url, filename) + self.pyload.hookManager.dispatchEvent("download_start", self.pyfile, url, filename) try: newname = self.req.httpDownload(url, filename, get=get, post=post, ref=ref, cookies=cookies, @@ -532,7 +532,7 @@ class Hoster(Plugin): value = value.strip() if key in header: - if type(header[key]) == list: + if type(header[key]) is list: header[key].append(value) else: header[key] = [header[key], value] @@ -550,7 +550,7 @@ class Hoster(Plugin): baseurl = "%s://%s" % (url_p.scheme, url_p.netloc) location = urlparse.urljoin(baseurl, location) - if 'code' in header and header['code'] == 302: + if 'code' in header and header['code'] is 302: link = location if follow_location: @@ -597,7 +597,7 @@ class Hoster(Plugin): if traffic is None: return False - elif traffic == -1: + elif traffic is -1: return True else: size = self.pyfile.size / 1024 @@ -612,6 +612,11 @@ class Hoster(Plugin): return self.pyfile.package().password or "" + #: Deprecated method, use `check_for_same_files` instead + def checkForSameFiles(self, *args, **kwargs): + return self.check_for_same_files(*args, **kwargs) + + def check_for_same_files(self, starting=False): """ Checks if same file was/is downloaded within same package @@ -622,7 +627,7 @@ class Hoster(Plugin): pack = self.pyfile.package() for pyfile in self.pyload.files.cache.values(): - if pyfile != self.pyfile and pyfile.name == self.pyfile.name and pyfile.package().folder == pack.folder: + if pyfile != self.pyfile and pyfile.name is self.pyfile.name and pyfile.package().folder is pack.folder: if pyfile.status in (0, 12): #: Finished or downloading self.skip(pyfile.pluginname) elif pyfile.status in (5, 7) and starting: #: A download is waiting/starting and was appenrently started before diff --git a/module/plugins/internal/MultiHook.py b/module/plugins/internal/MultiHook.py index 09f91bb2a..32d83e1ca 100644 --- a/module/plugins/internal/MultiHook.py +++ b/module/plugins/internal/MultiHook.py @@ -12,7 +12,7 @@ class MultiHook(Hook): __name__ = "MultiHook" __type__ = "hook" __version__ = "0.51" - __status__ = "stable" + __status__ = "testing" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ("pluginlist" , "str" , "Plugin list (comma separated)", "" ), @@ -119,7 +119,7 @@ class MultiHook(Hook): pluginlist = self.get_config('pluginlist', '').replace('|', ',').replace(';', ',').split(',') configset = self._plugin_set(pluginlist) - if configmode == "listed": + if configmode is "listed": pluginset &= configset else: pluginset -= configset @@ -186,7 +186,7 @@ class MultiHook(Hook): def override_plugins(self): excludedList = [] - if self.plugintype == "hoster": + if self.plugintype is "hoster": pluginMap = dict((name.lower(), name) for name in self.pyload.pluginManager.hosterPlugins.iterkeys()) accountList = [account.type.lower() for account in self.pyload.api.getAccounts(False) if account.valid and account.premium] else: diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py index 2fc319102..fe6fa29d6 100644 --- a/module/plugins/internal/MultiHoster.py +++ b/module/plugins/internal/MultiHoster.py @@ -10,7 +10,7 @@ class MultiHoster(SimpleHoster): __name__ = "MultiHoster" __type__ = "hoster" __version__ = "0.43" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'^unmatchable$' __config__ = [("use_premium" , "bool", "Use premium account if available" , True), @@ -26,7 +26,7 @@ class MultiHoster(SimpleHoster): def setup(self): self.chunk_limit = 1 - self.multi_dl = bool(self.account) + self.multiDL = bool(self.account) self.resume_download = self.premium diff --git a/module/plugins/internal/OCR.py b/module/plugins/internal/OCR.py index 13089c9c0..064bf1d7d 100644 --- a/module/plugins/internal/OCR.py +++ b/module/plugins/internal/OCR.py @@ -22,7 +22,7 @@ class OCR(Plugin): __name__ = "OCR" __type__ = "ocr" __version__ = "0.13" - __status__ = "stable" + __status__ = "testing" __description__ = """OCR base plugin""" __license__ = "GPLv3" @@ -88,7 +88,7 @@ class OCR(Plugin): self.pyload.log_debug("Saving tiff...") self.image.save(tmpTif.name, 'TIFF') - if os.name == "nt": + if os.name is "nt": tessparams = [os.path.join(pypath, "tesseract", "tesseract.exe")] else: tessparams = ["tesseract"] @@ -165,7 +165,7 @@ class OCR(Plugin): for x in xrange(w): for y in xrange(h): - if pixels[x, y] == 255: + if pixels[x, y] is 255: continue #: No point in processing white pixels since we only want to remove black pixel count = 0 @@ -198,7 +198,7 @@ class OCR(Plugin): #: Second pass: this time set all 1's to 255 (white) for x in xrange(w): for y in xrange(h): - if pixels[x, y] == 1: + if pixels[x, y] is 1: pixels[x, y] = 255 self.pixels = pixels @@ -213,7 +213,7 @@ class OCR(Plugin): for x in xrange(w): for y in xrange(h): - if pixels[x, y] == 0: + if pixels[x, y] is 0: pixels[x, y] = 155 highest = {} @@ -229,7 +229,7 @@ class OCR(Plugin): for x in xrange(w): for y in xrange(h): - if pixels[x, y] == 0: + if pixels[x, y] is 0: pixels[x, y] = 255 count = {} @@ -237,7 +237,7 @@ class OCR(Plugin): for x in xrange(w): count[x] = 0 for y in xrange(h): - if pixels[x, y] == 155: + if pixels[x, y] is 155: count[x] += 1 sum = 0 @@ -270,10 +270,10 @@ class OCR(Plugin): for x in xrange(w): for y in xrange(h): - if pixels[x, y] == 0: + if pixels[x, y] is 0: pixels[x, y] = 255 - if pixels[x, y] == 155: + if pixels[x, y] is 155: pixels[x, y] = 0 self.pixels = pixels @@ -327,7 +327,7 @@ class OCR(Plugin): for key, item in values.iteritems(): - if key.__class__ == str: + if key.__class__ is str: result = result.replace(key, item) else: for expr in key: diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py index 01cc1ce8a..e70c099b1 100644 --- a/module/plugins/internal/Plugin.py +++ b/module/plugins/internal/Plugin.py @@ -66,7 +66,7 @@ def replace_patterns(string, ruleslist): def set_cookies(cj, cookies): for cookie in cookies: - if isinstance(cookie, tuple) and len(cookie) == 3: + if isinstance(cookie, tuple) and len(cookie) is 3: domain, name, value = cookie cj.setCookie(domain, name, value) @@ -95,7 +95,7 @@ def parse_html_form(attr_str, html, input_names={}): #: Check input attributes for key, val in input_names.iteritems(): if key in inputs: - if isinstance(val, basestring) and inputs[key] == val: + if isinstance(val, basestring) and inputs[key] is val: continue elif isinstance(val, tuple) and inputs[key] in val: continue @@ -126,7 +126,7 @@ class Plugin(object): __name__ = "Plugin" __type__ = "hoster" __version__ = "0.13" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'^unmatchable$' __config__ = [] #: [("name", "type", "desc", "default")] @@ -232,7 +232,7 @@ class Plugin(object): """ Fail and give reason """ - raise Fail(encode(reason)) #: Move to manager in 0.4.10 + raise Fail(encode(reason)) #: Move `encode(reason)` to manager in 0.4.10 def error(self, reason="", type=_("Parse")): @@ -246,7 +246,7 @@ class Plugin(object): raise Fail(msg) - def load(self, url, get={}, post={}, ref=True, cookies=True, just_header=False, decode=True, multipart=True, req=None): + def load(self, url, get={}, post={}, ref=True, cookies=True, just_header=False, decode=True, req=None): """ Load content at url and returns it @@ -276,7 +276,7 @@ class Plugin(object): else: req = self.pyload.requestFactory.getRequest(self.__name__) - res = req.load(url, get, post, ref, cookies, just_header, multipart, decode is True) + res = req.load(url, get, post, ref, cookies, just_header, isinstance(post, dict), decode is True) #@TODO: Fix network multipart in 0.4.10 if decode: #@TODO: Move to network in 0.4.10 res = html_unescape(res) @@ -310,7 +310,7 @@ class Plugin(object): value = value.strip() if key in header: - if type(header[key]) == list: + if type(header[key]) is list: header[key].append(value) else: header[key] = [header[key], value] diff --git a/module/plugins/internal/SevenZip.py b/module/plugins/internal/SevenZip.py index f2194157c..dde12d17e 100644 --- a/module/plugins/internal/SevenZip.py +++ b/module/plugins/internal/SevenZip.py @@ -11,7 +11,7 @@ from module.utils import fs_encode, save_join as fs_join class SevenZip(UnRar): __name__ = "SevenZip" __version__ = "0.13" - __status__ = "stable" + __status__ = "testing" __description__ = """7-Zip extractor plugin""" __license__ = "GPLv3" @@ -40,7 +40,7 @@ class SevenZip(UnRar): @classmethod def find(cls): try: - if os.name == "nt": + if os.name is "nt": cls.CMD = os.path.join(pypath, "7z.exe") p = subprocess.Popen([cls.CMD], stdout=subprocess.PIPE, stderr=subprocess.PIPE) diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index efda7dc1a..dd3b97e91 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -11,7 +11,7 @@ class SimpleCrypter(Crypter, SimpleHoster): __name__ = "SimpleCrypter" __type__ = "crypter" __version__ = "0.56" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'^unmatchable$' __config__ = [("use_subfolder" , "bool", "Save package to subfolder" , True), #: Overrides pyload.config['general']['folder_per_package'] diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 5960794cc..2a5263449 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -25,7 +25,7 @@ class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" __version__ = "1.71" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -199,7 +199,7 @@ class SimpleHoster(Hoster): def setup(self): - self.resume_download = self.multi_dl = self.premium + self.resume_download = self.multiDL = self.premium def prepare(self): @@ -287,7 +287,7 @@ class SimpleHoster(Hoster): except Fail, e: #@TODO: Move to PluginThread in 0.4.10 err = str(e) #@TODO: Recheck in 0.4.10 - if err == _("No captcha result obtained in appropiate time by any of the plugins."): #@TODO: Fix in 0.4.10 + if err is _("No captcha result obtained in appropiate time by any of the plugins."): #@TODO: Fix in 0.4.10 self.check_file() elif self.get_config('fallback', True) and self.premium: @@ -322,7 +322,7 @@ class SimpleHoster(Hoster): pass self.log_warning(_("Check result: ") + errmsg, _("Waiting 1 minute and retry")) - self.want_reconnect = True + self.wantReconnect = True self.retry(wait_time=60, reason=errmsg) else: if self.CHECK_FILE: @@ -365,11 +365,11 @@ class SimpleHoster(Hoster): wait_time = sum(int(v) * {'hr': 3600, 'hour': 3600, 'min': 60, 'sec': 1, "": 1}[u.lower()] for v, u in re.findall(r'(\d+)\s*(hr|hour|min|sec|)', errmsg, re.I)) - self.want_reconnect = wait_time > 300 + self.wantReconnect = wait_time > 300 self.retry(1, wait_time, _("Download limit exceeded")) if hasattr(self, 'HAPPY_HOUR_PATTERN') and re.search(self.HAPPY_HOUR_PATTERN, self.html): - self.multi_dl = True + self.multiDL = True if hasattr(self, 'ERROR_PATTERN'): m = re.search(self.ERROR_PATTERN, self.html) @@ -389,7 +389,7 @@ class SimpleHoster(Hoster): wait_time = sum(int(v) * {'hr': 3600, 'hour': 3600, 'min': 60, 'sec': 1, "": 1}[u.lower()] for v, u in re.findall(r'(\d+)\s*(hr|hour|min|sec|)', errmsg, re.I)) - self.want_reconnect = wait_time > 300 + self.wantReconnect = wait_time > 300 self.retry(1, wait_time, _("Download limit exceeded")) elif re.search('country|ip|region|nation', errmsg, re.I): @@ -420,7 +420,7 @@ class SimpleHoster(Hoster): self.fail(_("File can be downloaded by premium users only")) else: - self.want_reconnect = True + self.wantReconnect = True self.retry(wait_time=60, reason=errmsg) elif hasattr(self, 'WAIT_PATTERN'): diff --git a/module/plugins/internal/UnRar.py b/module/plugins/internal/UnRar.py index 1a2e64b94..90b6431ab 100644 --- a/module/plugins/internal/UnRar.py +++ b/module/plugins/internal/UnRar.py @@ -23,7 +23,7 @@ def renice(pid, value): class UnRar(Extractor): __name__ = "UnRar" __version__ = "1.22" - __status__ = "stable" + __status__ = "testing" __description__ = """Rar extractor plugin""" __license__ = "GPLv3" @@ -51,7 +51,7 @@ class UnRar(Extractor): @classmethod def find(cls): try: - if os.name == "nt": + if os.name is "nt": cls.CMD = os.path.join(pypath, "RAR.exe") else: cls.CMD = "rar" @@ -63,7 +63,7 @@ class UnRar(Extractor): except OSError: try: - if os.name == "nt": + if os.name is "nt": cls.CMD = os.path.join(pypath, "UnRAR.exe") else: cls.CMD = "unrar" @@ -134,7 +134,7 @@ class UnRar(Extractor): if not c: break #: Reading a percentage sign -> set progress and restart - if c == '%': + if c is '%': self.notify_progress(int(s)) s = "" #: Not reading a digit -> therefore restart @@ -180,7 +180,7 @@ class UnRar(Extractor): #: eventually Multipart Files files.extend(fs_join(dir, os.path.basename(file)) for file in filter(self.is_multipart, os.listdir(dir)) - if re.sub(self.re_multipart, ".rar", name) == re.sub(self.re_multipart, ".rar", file)) + if re.sub(self.re_multipart, ".rar", name) is re.sub(self.re_multipart, ".rar", file)) return files diff --git a/module/plugins/internal/UnZip.py b/module/plugins/internal/UnZip.py index ef2b2b56d..aadc303aa 100644 --- a/module/plugins/internal/UnZip.py +++ b/module/plugins/internal/UnZip.py @@ -13,7 +13,7 @@ from module.utils import fs_encode class UnZip(Extractor): __name__ = "UnZip" __version__ = "1.14" - __status__ = "stable" + __status__ = "testing" __description__ = """Zip extractor plugin""" __license__ = "GPLv3" diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py index b5028eda6..8612bad63 100644 --- a/module/plugins/internal/XFSAccount.py +++ b/module/plugins/internal/XFSAccount.py @@ -12,7 +12,7 @@ class XFSAccount(Account): __name__ = "XFSAccount" __type__ = "account" __version__ = "0.39" - __status__ = "stable" + __status__ = "testing" __description__ = """XFileSharing account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/internal/XFSCrypter.py b/module/plugins/internal/XFSCrypter.py index 7470eb221..fcb017466 100644 --- a/module/plugins/internal/XFSCrypter.py +++ b/module/plugins/internal/XFSCrypter.py @@ -7,7 +7,7 @@ class XFSCrypter(SimpleCrypter): __name__ = "XFSCrypter" __type__ = "crypter" __version__ = "0.11" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'^unmatchable$' diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py index 18a50a6b0..48772a817 100644 --- a/module/plugins/internal/XFSHoster.py +++ b/module/plugins/internal/XFSHoster.py @@ -14,7 +14,7 @@ class XFSHoster(SimpleHoster): __name__ = "XFSHoster" __type__ = "hoster" __version__ = "0.54" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -53,7 +53,7 @@ class XFSHoster(SimpleHoster): def setup(self): self.chunk_limit = -1 if self.premium else 1 - self.resume_download = self.multi_dl = self.premium + self.resume_download = self.multiDL = self.premium def prepare(self): @@ -152,7 +152,7 @@ class XFSHoster(SimpleHoster): stmsg = inputs['st'] - if stmsg == 'OK': + if stmsg is 'OK': self.html = self.load(action, post=inputs) elif 'Can not leech file' in stmsg: |