summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/Addon.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/Addon.py')
-rw-r--r--pyload/plugins/Addon.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pyload/plugins/Addon.py b/pyload/plugins/Addon.py
index 69280ca7e..d0ddfbca4 100644
--- a/pyload/plugins/Addon.py
+++ b/pyload/plugins/Addon.py
@@ -104,9 +104,13 @@ class Addon(Base):
#delete for various reasons
self.event_map = None
- #self.startPeriodical()
+ self.initPeriodical()
self.init()
+ def initPeriodical(self):
+ if id(self.periodical) != id(getattr(Addon, periodical)):
+ self.startPeriodical()
+
def startPeriodical(self, interval=self.interval, wait=self.interval):
if not self.cb and self.setInterval(interval, False):
self.cb = self.core.scheduler.addJob(wait, self._periodical, threaded=False)
@@ -118,7 +122,8 @@ class Addon(Base):
if self.cb and self.core.scheduler.removeJob(self.cb):
self.cb = None
return True
- return False
+ else:
+ return False
def setInterval(self, interval, recount=False):
if interval > 0: