X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/574f425cc1ebece0aa5f09fb77a8cb7ad0310a1f..4c1d3d2f5cf39f72bf85041a6ba6665350ea742e:/lib/python/Components/Converter/ServicePosition.py diff --git a/lib/python/Components/Converter/ServicePosition.py b/lib/python/Components/Converter/ServicePosition.py index b92af40b..3a86e3a4 100644 --- a/lib/python/Components/Converter/ServicePosition.py +++ b/lib/python/Components/Converter/ServicePosition.py @@ -3,7 +3,7 @@ from Poll import Poll 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 @@ -21,11 +21,6 @@ class ServicePosition(Converter, Poll, object): 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": @@ -37,7 +32,14 @@ class ServicePosition(Converter, Poll, object): 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