use ::getInfoObject for filesize (allows >4G)
[enigma2.git] / lib / python / Components / Converter / Poll.py
index 3ba5e87f51cfb1a3825dc624ccee27d2f0c4ec09..6db93ef5801319af6e6cd51fde726a67ee3eb2ec 100644 (file)
@@ -3,7 +3,7 @@ from enigma import eTimer
 class Poll(object):
        def __init__(self):
                self.__poll_timer = eTimer()
-               self.__poll_timer.timeout.get().append(self.changed)
+               self.__poll_timer.callback.append(self.poll)
                self.__interval = 1000
                self.__enabled = False
 
@@ -20,3 +20,14 @@ class Poll(object):
 
        poll_interval = property(lambda self: self.__interval, __setInterval)
        poll_enabled = property(lambda self: self.__enabled, __setEnable)
+
+       def poll(self):
+               self.changed((self.CHANGED_POLL,))
+
+       def doSuspend(self, suspended):
+               self.enabled = not suspended
+               if not suspended:
+                       self.poll()
+
+       def destroy(self):
+               self.__poll_timer.callback.remove(self.poll)