service menu layout fix
[enigma2.git] / lib / python / Components / Converter / ServiceName.py
index 78a3dca2542cf9621887817cadb9e8b17185033c..9ccbda58c0d1130ac97c13156bd27cd4c9e1105f 100644 (file)
@@ -1,5 +1,7 @@
+# -*- coding: utf-8 -*-
 from Components.Converter.Converter import Converter
 from enigma import iServiceInformation, iPlayableService
+from Components.Element import cached
 
 class ServiceName(Converter, object):
        NAME = 0
@@ -18,6 +20,7 @@ class ServiceName(Converter, object):
                        return "N/A"
                return info.getInfoString(what)
 
+       @cached
        def getText(self):
                service = self.source.service
                info = service and service.info()
@@ -25,12 +28,12 @@ class ServiceName(Converter, object):
                        return ""
                
                if self.type == self.NAME:
-                       return info.getName()
+                       return info.getName().replace('\xc2\x86', '').replace('\xc2\x87', '')
                elif self.type == self.PROVIDER:
                        return self.getServiceInfoValue(info, iServiceInformation.sProvider)
 
        text = property(getText)
 
-       def changed(self, *args):
-               if not len(args) or args[0] in [iPlayableService.evStart, iPlayableService.evEnd]:
-                       Converter.changed(self)
+       def changed(self, what):
+               if what[0] != self.CHANGED_SPECIFIC or what[1] in [iPlayableService.evStart]:
+                       Converter.changed(self, what)