Merge commit 'origin/bug_112_enable_extensions_manager' into experimental
[enigma2.git] / lib / python / Components / Converter / ServicePosition.py
index b92af40b723e9b447be45338c7f6cd8c639b7f74..3a86e3a44cdb20a2b4a7a816d3cd7ffb9919ca3e 100644 (file)
@@ -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