servicemp3.cpp: more simple/flexible streaming detection
[enigma2.git] / lib / python / Components / Renderer / Progress.py
index 9caea5e5453d38455eb46475e1630591e1ab53b3..f32802e46f339c0e9f2a32bb1c776cc6516efb1b 100644 (file)
@@ -12,7 +12,11 @@ class Progress(VariableValue, Renderer):
 
        GUI_WIDGET = eSlider
 
-       def changed(self):
+       def changed(self, what):
+               if what[0] == self.CHANGED_CLEAR:
+                       (self.range, self.value) = ((0, 1), 0)
+                       return
+
                range = self.source.range or 100
                value = self.source.value
                if value is None:
@@ -25,9 +29,9 @@ class Progress(VariableValue, Renderer):
                instance.setRange(self.__start, self.__end)
 
        def setRange(self, range):
-               (__start, __end) = range
+               (self.__start, self.__end) = range
                if self.instance is not None:
-                       self.instance.setRange(__start, __end)
+                       self.instance.setRange(self.__start, self.__end)
 
        def getRange(self):
                return (self.__start, self.__end)