diff options
Diffstat (limited to 'module/plugins/internal')
-rw-r--r-- | module/plugins/internal/DeadCrypter.py | 2 | ||||
-rw-r--r-- | module/plugins/internal/DeadHoster.py | 2 | ||||
-rw-r--r-- | module/plugins/internal/SimpleCrypter.py | 16 | ||||
-rw-r--r-- | module/plugins/internal/SimpleHoster.py | 12 | ||||
-rw-r--r-- | module/plugins/internal/XFSCrypter.py | 2 | ||||
-rw-r--r-- | module/plugins/internal/XFSHoster.py | 2 |
6 files changed, 19 insertions, 17 deletions
diff --git a/module/plugins/internal/DeadCrypter.py b/module/plugins/internal/DeadCrypter.py index 91cdf6036..4c635e366 100644 --- a/module/plugins/internal/DeadCrypter.py +++ b/module/plugins/internal/DeadCrypter.py @@ -8,7 +8,7 @@ class DeadCrypter(_Crypter): __type__ = "crypter" __version__ = "0.02" - __pattern__ = None + __pattern__ = r'^unmatchable$' __description__ = """ Crypter is no longer available """ __license__ = "GPLv3" diff --git a/module/plugins/internal/DeadHoster.py b/module/plugins/internal/DeadHoster.py index 2d91b1d2d..b78068069 100644 --- a/module/plugins/internal/DeadHoster.py +++ b/module/plugins/internal/DeadHoster.py @@ -16,7 +16,7 @@ class DeadHoster(_Hoster): __type__ = "hoster" __version__ = "0.12" - __pattern__ = None + __pattern__ = r'^unmatchable$' __description__ = """ Hoster is no longer available """ __license__ = "GPLv3" diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index 9856ae2e5..0985bac60 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -13,9 +13,9 @@ from module.utils import fixup, html_unescape class SimpleCrypter(Crypter): __name__ = "SimpleCrypter" __type__ = "crypter" - __version__ = "0.25" + __version__ = "0.26" - __pattern__ = None + __pattern__ = r'^unmatchable$' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), #: Overrides core.config['general']['folder_per_package'] ("subfolder_per_package", "bool", "Create a subfolder for each package", True)] @@ -71,6 +71,8 @@ class SimpleCrypter(Crypter): #@TODO: remove in 0.4.10 def init(self): + self.info = {} + account_name = (self.__name__ + ".py").replace("Folder.py", "").replace(".py", "") account = self.core.accountManager.getAccountPlugin(account_name) @@ -126,17 +128,17 @@ class SimpleCrypter(Crypter): if name and name != url: self.pyfile.name = name else: - self.pyfile.name = self.file_info['name'] = html_unescape(urlparse(url).path.split("/")[-1]) + self.pyfile.name = self.info['name'] = html_unescape(urlparse(url).path.split("/")[-1]) - if status == 1: + if status is 1: self.offline() - elif status == 6: + elif status is 6: self.tempOffline() - self.file_info['folder'] = self.pyfile.name + self.info['folder'] = self.pyfile.name self.logDebug("FILE NAME: %s" % self.pyfile.name) - return self.file_info + return self.info def getLinks(self): diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 1555151a5..1f673a5c2 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -155,14 +155,14 @@ def parseFileInfo(self, url="", html=""): if not hasattr(self, "info"): self.info = {} - try: #: Remove try-except statement in 0.4.10 + try: self.logDebug(_("File info (before update): %s") % self.info) except: pass self.info.update(info) - try: #: Remove try-except statement in 0.4.10 + try: self.logDebug(_("File info (after update): %s") % self.info) except: pass @@ -255,7 +255,7 @@ class SimpleHoster(Hoster): FORCE_CHECK_TRAFFIC = False #: Set to True to force checking traffic left for premium account - def init(): + def init(self): self.info = {} @@ -330,11 +330,11 @@ class SimpleHoster(Hoster): else: self.pyfile.name = self.info['name'] = html_unescape(urlparse(url).path.split("/")[-1]) - if status == 1: + if status is 1: self.offline() - elif status == 6: + elif status is 6: self.tempOffline() - elif status != 2: + elif status is not 2: self.error(_("File info: %s") % self.info) if size: diff --git a/module/plugins/internal/XFSCrypter.py b/module/plugins/internal/XFSCrypter.py index 5a126707b..2e491050b 100644 --- a/module/plugins/internal/XFSCrypter.py +++ b/module/plugins/internal/XFSCrypter.py @@ -8,7 +8,7 @@ class XFSCrypter(SimpleCrypter): __type__ = "crypter" __version__ = "0.03" - __pattern__ = None + __pattern__ = r'^unmatchable$' __description__ = """XFileSharing decrypter plugin""" __license__ = "GPLv3" diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py index 838af9102..a2e4f5846 100644 --- a/module/plugins/internal/XFSHoster.py +++ b/module/plugins/internal/XFSHoster.py @@ -17,7 +17,7 @@ class XFSHoster(SimpleHoster): __type__ = "hoster" __version__ = "0.09" - __pattern__ = None + __pattern__ = r'^unmatchable$' __description__ = """XFileSharing hoster plugin""" __license__ = "GPLv3" |