From: Felix Domke Date: Thu, 27 Aug 2009 10:06:03 +0000 (+0200) Subject: add ' fps' X-Git-Tag: 2.6.0~91 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/17ce0c30d39a197c49c9a2945e4e5cff53317aa4?ds=sidebyside add ' fps' --- diff --git a/lib/python/Components/Converter/ServiceInfo.py b/lib/python/Components/Converter/ServiceInfo.py index 461a0461..5014fde6 100644 --- a/lib/python/Components/Converter/ServiceInfo.py +++ b/lib/python/Components/Converter/ServiceInfo.py @@ -42,13 +42,13 @@ class ServiceInfo(Converter, object): "Framerate": (self.FRAMERATE, (iPlayableService.evVideoSizeChanged,iPlayableService.evUpdatedInfo,)), }[type] - def getServiceInfoString(self, info, what, convert = lambda x: x): + def getServiceInfoString(self, info, what, convert = lambda x: "%d" % x): v = info.getInfo(what) if v == -1: return "N/A" if v == -2: return info.getInfoString(what) - return "%d" % convert(v) + return convert(v) @cached def getBoolean(self): @@ -111,7 +111,7 @@ class ServiceInfo(Converter, object): elif self.type == self.SID: return self.getServiceInfoString(info, iServiceInformation.sSID) elif self.type == self.FRAMERATE: - return self.getServiceInfoString(info, iServiceInformation.sFrameRate, lambda x: (x+500)/1000) + return self.getServiceInfoString(info, iServiceInformation.sFrameRate, lambda x: "%d fps" % ((x+500)/1000)) return "" text = property(getText)