PEP8: Fix whitespace
[openblackhole/openblackhole-enigma2.git] / lib / python / Components / Renderer / NextEpgInfo.py
1 from Components.VariableText import VariableText
2 from Renderer import Renderer
3 from enigma import eLabel, eEPGCache
4 from time import localtime
5
6 class NextEpgInfo(Renderer, VariableText):
7         def __init__(self):
8                 Renderer.__init__(self)
9                 VariableText.__init__(self)
10                 self.epgcache = eEPGCache.getInstance()
11         GUI_WIDGET = eLabel
12
13         def changed(self, what):
14                 self.text = ""
15                 reference = self.source.service
16                 info = reference and self.source.info
17                 if info is None:
18                         return
19                 nextEvent = self.epgcache.lookupEvent(['IBDCTSERNX', (reference.toString(), 1, -1)])
20                 if nextEvent:
21                         if nextEvent[0][4]:
22                                 self.text = pgettext("now/next: 'next' event label", "Next") + ": " + nextEvent[0][4]