-2

I have this code from enigma2 that actually works perfectly but sometimes it fails when it comes to some channels that more time to display epg information in the screen, this results in no epg. So I want some help to re-execute the code after a while like 30 seconds. I tried poll-interval but to no success. Here is my code:

from Source import Source

class Event(Source, object):
    def __init__(self):
        Source.__init__(self)
        self.evt = None

    def getCurrentEvent(self):
        return self.evt

    event = property(getCurrentEvent)

    def newEvent(self, event):
        if not self.evt or self.evt != event:
            self.evt = event
            if not event:
                self.changed((self.CHANGED_CLEAR,))
            else:
                self.changed((self.CHANGED_ALL,))
jotik
  • 17,044
  • 13
  • 58
  • 123
  • Possible duplicate of [Javascript: Call a function after specific time period](http://stackoverflow.com/questions/11901074/javascript-call-a-function-after-specific-time-period) – DanMan Jul 07 '16 at 18:40
  • Wait a sec... that's not even JS, is it? – DanMan Jul 07 '16 at 18:41
  • Possible duplicate of [What is the best way to repeatedly execute a function every x seconds in Python?](http://stackoverflow.com/questions/474528/what-is-the-best-way-to-repeatedly-execute-a-function-every-x-seconds-in-python) – dot.Py Jul 07 '16 at 19:41

1 Answers1

0

Try "Clear Cache" plugin because sometimes what you need is just more cache especially if you have a dm800