summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/DownloadScheduler.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks/DownloadScheduler.py')
-rw-r--r--module/plugins/hooks/DownloadScheduler.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/module/plugins/hooks/DownloadScheduler.py b/module/plugins/hooks/DownloadScheduler.py
index c7a0155dd..70930ab67 100644
--- a/module/plugins/hooks/DownloadScheduler.py
+++ b/module/plugins/hooks/DownloadScheduler.py
@@ -26,9 +26,11 @@ class DownloadScheduler(Hook):
def setup(self):
self.cb = None # callback to scheduler job; will be by removed hookmanager when hook unloaded
+
def coreReady(self):
self.updateSchedule()
+
def updateSchedule(self, schedule=None):
if schedule is None:
schedule = self.getConfig("timetable")
@@ -56,6 +58,7 @@ class DownloadScheduler(Hook):
self.core.scheduler.removeJob(self.cb)
self.cb = self.core.scheduler.addJob(next_time, self.updateSchedule, threaded=False)
+
def setDownloadSpeed(self, speed):
if speed == 0:
abort = self.getConfig("abort")