summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/config/default.py1
-rwxr-xr-xpyLoadCore.py6
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