from enigma import iPlayableService
from Components.Element import cached, ElementError
-class ServicePosition(Converter, Poll, object):
+class ServicePosition(Poll, Converter, object):
TYPE_LENGTH = 0
TYPE_POSITION = 1
TYPE_REMAINING = 2
self.showHours = 'ShowHours' in args
self.showNoSeconds = 'ShowNoSeconds' in args
- if self.detailed:
- self.poll_interval = 100
- else:
- self.poll_interval = 500
-
if type == "Length":
self.type = self.TYPE_LENGTH
elif type == "Position":
else:
raise ElementError("type must be {Length|Position|Remaining|Gauge} with optional arguments {Negate|Detailed|ShowHours|ShowNoSeconds} for ServicePosition converter")
- self.poll_enabled = self.type != self.TYPE_LENGTH
+ if self.detailed:
+ self.poll_interval = 100
+ elif self.type == self.TYPE_LENGTH:
+ self.poll_interval = 2000
+ else:
+ self.poll_interval = 500
+
+ self.poll_enabled = True
def getSeek(self):
s = self.source.service