diff options
author | 2012-07-27 17:20:57 +0200 | |
---|---|---|
committer | 2012-07-27 17:20:57 +0200 | |
commit | 176095687f437632cf33484a4dc38e2a51f5cb6f (patch) | |
tree | 8d5b704cd98e52472f525b43eb299e662800e16e | |
parent | Fix permissions for log directory (diff) | |
download | pyload-176095687f437632cf33484a4dc38e2a51f5cb6f.tar.xz |
adds "restart failed on startup" option
-rw-r--r-- | module/config/default.py | 1 | ||||
-rwxr-xr-x | pyLoadCore.py | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/module/config/default.py b/module/config/default.py index 1dbb58eca..085061653 100644 --- a/module/config/default.py +++ b/module/config/default.py @@ -103,6 +103,7 @@ def make_config(config): ("max_speed", "int", _("Max Download Speed in kb/s"), _("Tooltip"), -1), ("ipv6", "bool", _("Allow IPv6"), _("Tooltip"), False), ("chunks", "int", _("Max connections for one download"), _("Tooltip"), 3), + ("restart_failed", "bool", _("Restart failed downloads on startup"), _("Tooltip"), False), ], True) diff --git a/pyLoadCore.py b/pyLoadCore.py index b69b919d3..ac7c785ca 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -450,6 +450,12 @@ class Core(object): #self.scheduler.addJob(0, self.accountManager.getAccountInfos) self.log.info(_("Activating Accounts...")) self.accountManager.refreshAllAccounts() + + #restart failed + if self.config["download"]["restart_failed"]: + self.log.info(_("Restarting failed downloads...")) + self.api.restartFailed() + self.threadManager.pause = False self.running = True |