diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2009-02-27 23:19:00 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2009-02-27 23:19:00 +0100 |
| commit | a9589a258f6173fc8af17d802def10d0d918bc16 (patch) | |
| tree | ac82b6f28876c204a4b6994fd855239397d07f4e /lib/python/Screens/ChannelSelection.py | |
| parent | 574d0f07a04f5b9c295e7aa1e4e00a14fa6b2d5e (diff) | |
| download | enigma2-a9589a258f6173fc8af17d802def10d0d918bc16.tar.gz enigma2-a9589a258f6173fc8af17d802def10d0d918bc16.zip | |
add possibility to change services in single service epg with bouquet +/- key
Diffstat (limited to 'lib/python/Screens/ChannelSelection.py')
| -rw-r--r-- | lib/python/Screens/ChannelSelection.py | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index bae8f7de..0ff4042b 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -317,11 +317,24 @@ class ChannelSelectionEPG: def showEPGList(self): ref=self.getCurrentSelection() - ptr=eEPGCache.getInstance() - if ptr.startTimeQuery(ref) != -1: - self.session.open(EPGSelection, ref) - else: - print 'no epg for service', ref.toString() + if ref: + self.savedService = ref + self.session.openWithCallback(self.SingleServiceEPGClosed, EPGSelection, ref, serviceChangeCB=self.changeServiceCB) + + def SingleServiceEPGClosed(self, ret=False): + self.setCurrentSelection(self.savedService) + + def changeServiceCB(self, direction, epg): + beg = self.getCurrentSelection() + while True: + if direction > 0: + self.moveDown() + else: + self.moveUp() + cur = self.getCurrentSelection() + if cur == beg or not (cur.flags & eServiceReference.isMarker): + break + epg.setService(ServiceReference(self.getCurrentSelection())) class ChannelSelectionEdit: def __init__(self): |
