use "0" key in channellist as pathUp
[enigma2.git] / lib / python / Screens / ChannelSelection.py
index 9e1184d38bdd7e69a4cc99401ce55250d8baff52..d8aa39d45e3f2c456d6661a84b3be46c3a6f87b3 100644 (file)
@@ -464,7 +464,7 @@ class ChannelSelectionBase(Screen):
                                "7": self.keyNumberGlobal,
                                "8": self.keyNumberGlobal,
                                "9": self.keyNumberGlobal,
-                               "0": self.keyNumberGlobal
+                               "0": self.keyNumber0
                        })
 
        def appendDVBTypes(self, ref):
@@ -789,6 +789,27 @@ class ChannelSelectionBase(Screen):
                        return bouquets
                return None
 
+       def keyNumber0(self, num):
+               if len(self.servicePath) > 1:
+                       self.keyGoUp()
+               else:
+                       self.keyNumberGlobal(num)
+
+       def keyGoUp(self):
+               if len(self.servicePath) > 1:
+                       if self.isBasePathEqual(self.bouquet_root):
+                               self.showFavourites()
+                       else:
+                               ref = eServiceReference('%s FROM SATELLITES ORDER BY satellitePosition'%(self.service_types))
+                               if self.isBasePathEqual(ref):
+                                       self.showSatellites()
+                               else:
+                                       ref = eServiceReference('%s FROM PROVIDERS ORDER BY name'%(self.service_types))
+                                       if self.isBasePathEqual(ref):
+                                               self.showProviders()
+                                       else:
+                                               self.showAllServices()
+
 HISTORYSIZE = 20
 
 class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelectionEPG):