summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/FileserveCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-09 00:35:51 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-09 00:35:51 +0100
commitfd105f8e51768ec1943cda2375bdfdbe5b0a3951 (patch)
treeccbdbe3cd23c606e8102f11ae4e0722f7e7a3227 /module/plugins/hoster/FileserveCom.py
parent"New Year" Update: hook plugins (diff)
downloadpyload-fd105f8e51768ec1943cda2375bdfdbe5b0a3951.tar.xz
"New Year" Update: hoster plugins
Diffstat (limited to 'module/plugins/hoster/FileserveCom.py')
-rw-r--r--module/plugins/hoster/FileserveCom.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index 52a071b52..515ec9029 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -118,14 +118,16 @@ class FileserveCom(Hoster):
self.logDebug(self.req.http.lastEffectiveURL)
check = self.checkDownload({"expired": self.LINK_EXPIRED_PATTERN,
- "wait": re.compile(self.LONG_WAIT_PATTERN),
- "limit": self.DAILY_LIMIT_PATTERN})
+ "wait" : re.compile(self.LONG_WAIT_PATTERN),
+ "limit" : self.DAILY_LIMIT_PATTERN})
if check == "expired":
self.logDebug("Download link was expired")
self.retry()
+
elif check == "wait":
self.doLongWait(self.lastCheck)
+
elif check == "limit":
self.logWarning(_("Download limited reached for today"))
self.setWait(secondsToMidnight(gmt=2), True)
@@ -204,12 +206,9 @@ class FileserveCom(Hoster):
self.download(premium_url or self.pyfile.url)
- if not premium_url:
- check = self.checkDownload({"login": re.compile(self.NOT_LOGGED_IN_PATTERN)})
-
- if check == "login":
- self.account.relogin(self.user)
- self.retry(reason=_("Not logged in"))
+ if not premium_url and self.checkDownload({"login": re.compile(self.NOT_LOGGED_IN_PATTERN)}):
+ self.account.relogin(self.user)
+ self.retry(reason=_("Not logged in"))
def getInfo(urls):