from PerServiceDisplay import PerServiceDisplay, PerServiceBase
+from Components.GUIComponent import GUIComponent
from enigma import eTimer, iPlayableService, iSeekableServicePtr, ePositionGauge
import time
l = self.get(self.TYPE_POSITION)
if l != -1:
l += self.relative_base
- t = time.localtime(l)
- timestr = "%2d:%02d:%02d" % (t.tm_hour, t.tm_min, t.tm_sec)
+ try:
+ t = time.localtime(l)
+ timestr = "%2d:%02d:%02d" % (t.tm_hour, t.tm_min, t.tm_sec)
+ except ValueError:
+ timestr = ""
else:
timestr = ""
self.updateTimer.stop()
self.setText("");
-class ServicePositionGauge(PerServiceBase):
+class ServicePositionGauge(PerServiceBase, GUIComponent):
def __init__(self, navcore):
+ GUIComponent.__init__(self)
PerServiceBase.__init__(self, navcore,
{
iPlayableService.evStart: self.newService,