diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-27 21:23:33 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-27 21:23:33 +0100 |
commit | 4882503efe1fce2f123723766f672456e5ccc221 (patch) | |
tree | 861cba6114c0e0e25a0ef0edda3ce13f9fe5886d /module/plugins/internal | |
parent | [LinkdecrypterCom] Extend MultiHook (diff) | |
download | pyload-4882503efe1fce2f123723766f672456e5ccc221.tar.xz |
[SimpleCrypter][SimpleDereferer] Fail if no link grabbed
Diffstat (limited to 'module/plugins/internal')
-rw-r--r-- | module/plugins/internal/SimpleCrypter.py | 5 | ||||
-rw-r--r-- | module/plugins/internal/SimpleDereferer.py | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py index 428826456..51ba07eb7 100644 --- a/module/plugins/internal/SimpleCrypter.py +++ b/module/plugins/internal/SimpleCrypter.py @@ -12,7 +12,7 @@ from module.utils import fixup class SimpleCrypter(Crypter, SimpleHoster): __name__ = "SimpleCrypter" __type__ = "crypter" - __version__ = "0.35" + __version__ = "0.36" __pattern__ = r'^unmatchable$' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), #: Overrides core.config['general']['folder_per_package'] @@ -119,6 +119,9 @@ class SimpleCrypter(Crypter, SimpleHoster): if self.links: self.packages = [(self.info['name'], self.links, self.info['folder'])] + elif not self.urls and not self.packages: #@TODO: Remove in 0.4.10 + self.fail("No link grabbed") + def checkNameSize(self, getinfo=True): if getinfo: diff --git a/module/plugins/internal/SimpleDereferer.py b/module/plugins/internal/SimpleDereferer.py index 0ad1098f4..04d63658e 100644 --- a/module/plugins/internal/SimpleDereferer.py +++ b/module/plugins/internal/SimpleDereferer.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import _isDirectLink, set_cookies class SimpleDereferer(Crypter): __name__ = "SimpleDereferer" __type__ = "crypter" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'^unmatchable$' __config__ = [("use_subfolder", "bool", "Save package to subfolder", True), @@ -65,6 +65,9 @@ class SimpleDereferer(Crypter): if link.strip(): self.urls = [link.strip()] #@TODO: Remove `.strip()` in 0.4.10 + elif not self.urls and not self.packages: #@TODO: Remove in 0.4.10 + self.fail("No link grabbed") + def prepare(self): self.req.setOption("timeout", 120) |