summaryrefslogtreecommitdiffstats
path: root/module/plugins/Hoster.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-02-13 14:36:21 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-02-13 14:36:21 +0100
commit0a453a4ae0294910eb8a1076d9f291b78c7e7eb3 (patch)
tree47a64582b91dc69e417f7af10f988b5cea5b40ed /module/plugins/Hoster.py
parentIf the account is not yet aware of `trafficleft`, force an update to the acco... (diff)
downloadpyload-0a453a4ae0294910eb8a1076d9f291b78c7e7eb3.tar.xz
little account, hoster fix
Diffstat (limited to 'module/plugins/Hoster.py')
-rw-r--r--module/plugins/Hoster.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/module/plugins/Hoster.py b/module/plugins/Hoster.py
index 05f55ebc8..fc9e23132 100644
--- a/module/plugins/Hoster.py
+++ b/module/plugins/Hoster.py
@@ -90,7 +90,7 @@ class Hoster(Base):
#: Browser instance, see `network.Browser`
self.req = self.account.getAccountRequest()
# Default: -1, True, True
- self.chunkLimit, self.resumeDownload, self.multiDL = self.account.getDownloadSettings()
+ self.chunkLimit, self.limitDL, self.resumeDownload = self.account.getDownloadSettings()
self.premium = self.account.isPremium()
else:
self.req = self.core.requestFactory.getRequest(self.__name__)
@@ -131,7 +131,10 @@ class Hoster(Base):
if self.account:
limit = self.account.options.get("limitDL", 0)
if limit == "": limit = 0
- return int(limit)
+ if self.limitDL > 0: # a limit is already set, we use the minimum
+ return min(int(limit), self.limitDL)
+ else:
+ return int(limit)
else:
return self.limitDL