summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar GammaC0de <GammaC0de@users.noreply.github.com> 2015-12-20 23:21:42 +0100
committerGravatar GammaC0de <GammaC0de@users.noreply.github.com> 2015-12-20 23:21:42 +0100
commit4e7b9e94978c7271e66dbe794c925093838a19c4 (patch)
treea6b871937a774092dec8be0c62cbc319511fc6ce /module
parent[SimpleHoster] update (diff)
downloadpyload-4e7b9e94978c7271e66dbe794c925093838a19c4.tar.xz
[SimpleHoster] update (2)
Diffstat (limited to 'module')
-rw-r--r--module/plugins/internal/SimpleHoster.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 44270e7b2..2cf55950e 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -16,7 +16,7 @@ from module.plugins.internal.utils import (encode, parse_name, parse_size,
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "2.09"
+ __version__ = "2.10"
__status__ = "stable"
__pattern__ = r'^unmatchable$'
@@ -277,7 +277,10 @@ class SimpleHoster(Hoster):
self.log_info(_("Processing as free download..."))
self.handle_free(pyfile)
- if self.link and not self.last_download:
+ if not self.link:
+ self.error(_("%s download link not found") % ("Premium" if self.premium else "Free"))
+
+ if self.last_download:
self.log_info(_("Downloading file..."))
self.download(self.link, disposition=self.DISPOSITION)
@@ -431,9 +434,7 @@ class SimpleHoster(Hoster):
self.log_warning(_("Free download not implemented"))
m = re.search(self.LINK_FREE_PATTERN, self.data)
- if m is None:
- self.error(_("Free download link not found"))
- else:
+ if m is not None:
self.link = m.group(1)
@@ -443,7 +444,5 @@ class SimpleHoster(Hoster):
self.restart(premium=False)
m = re.search(self.LINK_PREMIUM_PATTERN, self.data)
- if m is None:
- self.error(_("Premium download link not found"))
- else:
+ if m is not None:
self.link = m.group(1)