aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Screens/ChannelSelection.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py
index 6c8164bf..d256d3e7 100644
--- a/lib/python/Screens/ChannelSelection.py
+++ b/lib/python/Screens/ChannelSelection.py
@@ -63,6 +63,7 @@ class ChannelSelection(Screen):
def lastService(self):
self.lastServiceTimer.stop()
#zap to last running tv service
+ self.setRoot(eServiceReference(config.tv.lastroot.value))
self.session.nav.playService(eServiceReference(config.tv.lastservice.value))
def __init__(self, session):
@@ -71,7 +72,7 @@ class ChannelSelection(Screen):
#config for lastservice
config.tv = ConfigSubsection();
config.tv.lastservice = configElement("config.tv.lastservice", configText, "", 0);
-
+ config.tv.lastroot = configElement("config.tv.lastroot", configText, "", 0);
self.entry_marked = False
self.movemode = False
@@ -86,7 +87,9 @@ class ChannelSelection(Screen):
self["key_blue"] = Button("Favourites")
self["list"] = ServiceList()
- self.setRoot(eServiceReference("""1:0:1:0:0:0:0:0:0:0:(type == 1)"""))
+
+ if config.tv.lastroot.value == "":
+ self.setRoot(eServiceReference("""1:0:1:0:0:0:0:0:0:0:(type == 1)"""))
#self["okbutton"] = Button("ok", [self.channelSelected])
@@ -182,6 +185,7 @@ class ChannelSelection(Screen):
self.mutableList = list.startEdit()
else:
self.mutableList = None
+ self.saveRoot(root)
self["list"].setRoot(root)
def clearMarks(self):
@@ -242,6 +246,11 @@ class ChannelSelection(Screen):
list = self["list"]
list.setMode(list.MODE_FAVOURITES)
+ def saveRoot(self, root):
+ if root is not None:
+ config.tv.lastroot.value = root.toString()
+ config.tv.lastroot.save()
+
def saveChannel(self):
ref = self.session.nav.getCurrentlyPlayingServiceReference()
if ref is not None: