X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/d8db49b1ebcfd2a886be1536bbbc12d214e185a5..77a115baa70d23d342a1b54aa5cedd57bc5d6282:/lib/python/Screens/ChannelSelection.py diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index 476348f7..c7c1b968 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -644,9 +644,12 @@ class ChannelSelectionBase(Screen): service.setName(service_name) # why we need this cast? except: if orbpos > 1800: # west - service.setName("%s (%3.1f" + _("W") + ")" %(str, (0 - (orbpos - 3600)) / 10.0)) + orbpos = 3600 - orbpos + h = _("W") else: - service.setName("%s (%3.1f" + _("E") + ")" % (str, orbpos / 10.0)) + h = _("E") + n = ("%s (%d.%d" + h + ")") % (service_name, orbpos / 10, orbpos % 10) + service.setName(n) self.servicelist.addService(service) self.servicelist.finishFill() if prev is not None: @@ -821,6 +824,7 @@ class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelect hlen = len(self.history) if hlen > HISTORYSIZE: del self.history[0] + hlen -= 1 self.history_pos = hlen-1 def historyBack(self): @@ -881,7 +885,7 @@ class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelect if pathstr is not None and pathstr.find(refstr) == 0: self.restoreRoot() lastservice=eServiceReference(config.tv.lastservice.value) - if lastservice is not None: + if lastservice.valid(): self.setCurrentSelection(lastservice) return True return False @@ -985,7 +989,7 @@ class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit, ChannelS if pathstr is not None and pathstr.find(refstr) == 0: self.restoreRoot() lastservice=eServiceReference(config.radio.lastservice.value) - if lastservice is not None: + if lastservice.valid(): self.setCurrentSelection(lastservice) return True return False