diff options
author | mkaay <mkaay@mkaay.de> | 2009-12-23 21:04:06 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2009-12-23 21:04:06 +0100 |
commit | 5ee3579572b60bb8f9e6475a517d69462b0cfe29 (patch) | |
tree | 7c3e26ad87bdaf10106bd1468b6e8f3c888e336e /pyLoadCore.py | |
parent | oops (diff) | |
download | pyload-5ee3579572b60bb8f9e6475a517d69462b0cfe29.tar.xz |
download speed limit
Diffstat (limited to 'pyLoadCore.py')
-rw-r--r-- | pyLoadCore.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py index 232adc253..85ca5a5fe 100644 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -90,7 +90,7 @@ class Core(object): self.plugin_folder = join("module", "plugins")
- self.xmlconfig = XMLConfigParser(join(self.path,"module","config","core.xml"))
+ self.xmlconfig = XMLConfigParser(join(self.path,"module","config","core.xml"), join(self.path,"module","config","core_default.xml"))
self.config = self.xmlconfig.getConfig()
self.do_kill = False
@@ -116,7 +116,9 @@ class Core(object): if self.config['ssl']['activated']:
self.check_install("OpenSSL", "OpenSSL for secure connection", True)
self.check_file(self.config['ssl']['cert'], _("ssl certificate"), False, True)
- self.check_file(self.config['ssl']['key'], _("ssl key"), False, True)
+ self.check_file(self.config['ssl']['key'], _("ssl key"), False, True) + + self.downloadSpeedLimit = int(self.xmlconfig.get("general", "download_speed_limit", 0))
if self.config['general']['debug_mode']:
self.init_logger(logging.DEBUG) # logging level
@@ -307,7 +309,10 @@ class Core(object): if start < now and end > now: return True
elif start > end and (now > start or now < end): return True
elif start < now and end < now and start > end: return True
- else: return False
+ else: return False + + def getMaxSpeed(self): + return self.downloadSpeedLimit
####################################
########## XMLRPC Methods ##########
|