Navigation.py: Introduce getCurrentlyPlayingServiceOrGroup
authorLittlesat <littlesat99@yahoo.com>
Fri, 7 Dec 2012 22:17:23 +0000 (23:17 +0100)
committerLittlesat <littlesat99@yahoo.com>
Fri, 7 Dec 2012 22:17:23 +0000 (23:17 +0100)
Instead of introducing a 'selected' argument keep the original
'getCurrentlyPlayingServiceReference', which always returns just
what is says, the currently playing service reference. This also
allows backwards compatability with possibly some plugins.

Introduce a new function, 'getCurrentlyPlayingServiceOrGroup', which
returns the current alternatives group (alternatives) in case the
current service belongs to a group, or the service itself in case the
service is not a member of such a group (alternatives)

20 files changed:
Navigation.py
RecordTimer.py
lib/python/Components/ServiceEventTracker.py
lib/python/Components/Sources/CurrentService.py
lib/python/Components/TuneTest.py
lib/python/Screens/AutoDiseqc.py
lib/python/Screens/ChannelSelection.py
lib/python/Screens/DVD.py
lib/python/Screens/EpgSelection.py
lib/python/Screens/InfoBar.py
lib/python/Screens/InfoBarGenerics.py
lib/python/Screens/MovieSelection.py
lib/python/Screens/ScanSetup.py
lib/python/Screens/ServiceInfo.py
lib/python/Screens/ServiceStopScreen.py
lib/python/Screens/SleepTimerEdit.py
lib/python/Screens/Standby.py
lib/python/Screens/SubservicesQuickzap.py
lib/python/Screens/TimerEdit.py
lib/python/Screens/TimerEntry.py

index 0ffb4ec..3e478f2 100644 (file)
@@ -28,6 +28,7 @@ class Navigation:
                self.event = [ ]
                self.record_event = [ ]
                self.currentlyPlayingServiceReference = None
+               self.currentlyPlayingServiceOrGroup = None
                self.currentlyPlayingService = None
                self.RecordTimer = RecordTimer.RecordTimer()
                if getFPWasTimerWakeup():
@@ -50,6 +51,7 @@ class Navigation:
                        x(i)
                if i == iPlayableService.evEnd:
                        self.currentlyPlayingServiceReference = None
+                       self.currentlyPlayingServiceOrGroup = None
                        self.currentlyPlayingService = None
 
        def dispatchRecordEvent(self, rec_service, event):
@@ -83,23 +85,25 @@ class Navigation:
                        if self.pnav:
                                self.pnav.stopService()
                                self.currentlyPlayingServiceReference = playref
-                               self.currentlyPlayingSelectedServiceReference = ref
+                               self.currentlyPlayingServiceOrGroup = ref
                                InfoBarInstance = InfoBar.instance
                                if InfoBarInstance is not None:
                                        InfoBarInstance.servicelist.servicelist.setCurrent(ref)
                                if self.pnav.playService(playref):
                                        print "Failed to start", playref
                                        self.currentlyPlayingServiceReference = None
+                                       self.currentlyPlayingServiceOrGroup = None
                                return 0
                else:
                        self.stopService()
                return 1
 
-       def getCurrentlyPlayingServiceReference(self, selected = True):
-               if selected and self.currentlyPlayingServiceReference:
-                       return self.currentlyPlayingSelectedServiceReference
+       def getCurrentlyPlayingServiceReference(self):
                return self.currentlyPlayingServiceReference
 
+       def getCurrentlyPlayingServiceOrGroup(self):
+               return self.currentlyPlayingServiceOrGroup
+
        def recordService(self, ref, simulate=False):
                service = None
                if not simulate: print "recording service: %s" % (str(ref))
@@ -129,6 +133,7 @@ class Navigation:
                if self.pnav:
                        self.pnav.stopService()
                self.currentlyPlayingServiceReference = None
+               self.currentlyPlayingServiceOrGroup = None
 
        def pause(self, p):
                return self.pnav and self.pnav.pause(p)
index 0e3c845..7dfd705 100644 (file)
@@ -279,7 +279,7 @@ class RecordTimerEntry(timer.TimerEntry, object):
                        self.log(7, "prepare failed")
                        if self.first_try_prepare:
                                self.first_try_prepare = False
-                               cur_ref = NavigationInstance.instance.getCurrentlyPlayingServiceReference(False)
+                               cur_ref = NavigationInstance.instance.getCurrentlyPlayingServiceReference()
                                if cur_ref and not cur_ref.getPath():
                                        if not config.recording.asktozap.value:
                                                self.log(8, "asking user to zap away")
index 2d6d86b..6e2b181 100644 (file)
@@ -38,7 +38,7 @@ class InfoBarBase:
                        ServiceEventTracker.setActiveInfoBar(self, None, None)
                else:
                        nav = self.session.nav
-                       ServiceEventTracker.setActiveInfoBar(self, not steal_current_service and nav.getCurrentService(), nav.getCurrentlyPlayingServiceReference())
+                       ServiceEventTracker.setActiveInfoBar(self, not steal_current_service and nav.getCurrentService(), nav.getCurrentlyPlayingServiceOrGroup())
                self.onClose.append(self.__close)
                InfoBarBase.infoBarOpened(self)
 
@@ -60,7 +60,7 @@ class ServiceEventTracker:
                func_list = set.EventMap.setdefault(evt, [])
                if func_list:
                        nav = set.navcore
-                       cur_ref = nav.getCurrentlyPlayingServiceReference()
+                       cur_ref = nav.getCurrentlyPlayingServiceOrGroup()
                        old_service_running = set.oldRef and cur_ref and cur_ref == set.oldRef and set.oldServiceStr == nav.getCurrentService().getPtrString()
                        if not old_service_running and set.oldServiceStr:
                                set.oldServiceStr = None
@@ -93,7 +93,7 @@ class ServiceEventTracker:
                        del stack[set.InfoBarStackSize]
                        old_service = nav.getCurrentService()
                        set.oldServiceStr = old_service and old_service.getPtrString()
-                       set.oldRef = nav.getCurrentlyPlayingServiceReference()
+                       set.oldRef = nav.getCurrentlyPlayingServiceOrGroup()
 #                      if set.InfoBarStackSize:
 #                              print "ServiceEventTracker reset active '" + str(stack[set.InfoBarStackSize-1]) + "'"
 
index 97c372e..24a4a14 100644 (file)
@@ -34,7 +34,7 @@ class CurrentService(PerServiceBase, Source):
        @cached
        def getCurrentServiceRef(self):
                if NavigationInstance.instance is not None:
-                       return NavigationInstance.instance.getCurrentlyPlayingServiceReference()
+                       return NavigationInstance.instance.getCurrentlyPlayingServiceOrGroup()
                return None
 
        serviceref = property(getCurrentServiceRef)
index 44b1909..45fb530 100644 (file)
@@ -49,7 +49,7 @@ class TuneTest:
                self.currTuned = None
                print "TuneTest for feid %d" % self.feid
                if not self.openFrontend():
-                       self.oldref = self.session.nav.getCurrentlyPlayingServiceReference()
+                       self.oldref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                        self.session.nav.stopService() # try to disable foreground service
                        if not self.openFrontend():
                                if self.session.pipshown: # try to disable pip
index 5355c03..9cd6555 100644 (file)
@@ -95,7 +95,7 @@ class AutoDiseqc(Screen, ConfigListScreen):
                self.found_sats = []
 
                if not self.openFrontend():
-                       self.oldref = self.session.nav.getCurrentlyPlayingServiceReference()
+                       self.oldref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                        self.session.nav.stopService()
                        if not self.openFrontend():
                                if self.session.pipshown:
index 74e23e6..68553a8 100644 (file)
@@ -437,7 +437,7 @@ class ChannelSelectionEPG:
 
        def zapToService(self, service, preview = False, zapback = False):
                if self.startServiceRef is None:
-                       self.startServiceRef = self.session.nav.getCurrentlyPlayingServiceReference()
+                       self.startServiceRef = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                if service is not None:
                        if self.servicelist.getRoot() != self.epg_bouquet:
                                self.servicelist.clearPath()
@@ -999,7 +999,7 @@ class ChannelSelectionBase(Screen):
                                if currentRoot is None or currentRoot != ref:
                                        self.clearPath()
                                        self.enterPath(ref)
-                                       self.setCurrentSelection(self.session.nav.getCurrentlyPlayingServiceReference())
+                                       self.setCurrentSelection(self.session.nav.getCurrentlyPlayingServiceOrGroup())
 
        def showSatellites(self):
                if not self.pathChangeDisabled:
@@ -1054,7 +1054,7 @@ class ChannelSelectionBase(Screen):
                                                                        service_name = ("%d.%d" + h) % (orbpos / 10, orbpos % 10)
                                                        service.setName("%s - %s" % (service_name, service_type))
                                                        self.servicelist.addService(service)
-                                               cur_ref = self.session.nav.getCurrentlyPlayingServiceReference(False)
+                                               cur_ref = self.session.nav.getCurrentlyPlayingServiceReference()
                                                if cur_ref:
                                                        pos = self.service_types.rfind(':')
                                                        refstr = '%s (channelID == %08x%04x%04x) && %s ORDER BY name' %(self.service_types[:pos+1],
@@ -1218,11 +1218,11 @@ class ChannelSelectionBase(Screen):
                                info = service.info()
                                if info:
                                        provider = info.getInfoString(iServiceInformation.sProvider)
-                                       op = int(self.session.nav.getCurrentlyPlayingServiceReference().toString().split(':')[6][:-4] or "0",16)
+                                       op = int(self.session.nav.getCurrentlyPlayingServiceOrGroup().toString().split(':')[6][:-4] or "0",16)
                                        refstr = '1:7:0:0:0:0:0:0:0:0:(provider == \"%s\") && (satellitePosition == %s) && %s ORDER BY name:%s'%(provider,op,self.service_types[self.service_types.rfind(':')+1:],provider)
                                        self.servicelist.setCurrent(eServiceReference(refstr))
                else:
-                       self.setCurrentSelection(self.session.nav.getCurrentlyPlayingServiceReference())
+                       self.setCurrentSelection(self.session.nav.getCurrentlyPlayingServiceOrGroup())
 
 HISTORYSIZE = 20
 
@@ -1364,7 +1364,7 @@ class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelect
 
        def channelSelected(self, doClose = True):
                if self.startServiceRef is None and not doClose:
-                       self.startServiceRef = self.session.nav.getCurrentlyPlayingServiceReference()
+                       self.startServiceRef = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                ref = self.getCurrentSelection()
                if self.movemode:
                        self.toggleMoveMarked()
@@ -1430,7 +1430,7 @@ class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelect
                                        # XXX: Make sure we set an invalid ref
                                        self.session.pip.playService(None)
                else:
-                       ref = self.session.nav.getCurrentlyPlayingServiceReference()
+                       ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                        if ref is None or ref != nref:
                                self.new_service_played = True
                                self.session.nav.playService(nref)
@@ -1472,7 +1472,7 @@ class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelect
 
        def historyBack(self):
                hlen = len(self.history)
-               currentPlayedRef = self.session.nav.getCurrentlyPlayingServiceReference()
+               currentPlayedRef = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                if hlen > 0 and self.history[self.history_pos][-1] != currentPlayedRef:
                        self.addToHistory(currentPlayedRef)
                        hlen = len(self.history)
@@ -1563,7 +1563,7 @@ class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelect
 
        def recallPrevService(self):
                hlen = len(self.history)
-               currentPlayedRef = self.session.nav.getCurrentlyPlayingServiceReference()
+               currentPlayedRef = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                if hlen > 0 and self.history[self.history_pos][-1] != currentPlayedRef:
                        self.addToHistory(currentPlayedRef)
                        hlen = len(self.history)
@@ -1598,7 +1598,7 @@ class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelect
                self.close(None)
 
        def zapBack(self):
-               if self.startServiceRef and self.session.nav.getCurrentlyPlayingServiceReference() != self.startServiceRef:
+               if self.startServiceRef and self.session.nav.getCurrentlyPlayingServiceOrGroup() != self.startServiceRef:
                        if self.startRoot:
                                self.clearPath()
                                self.recallBouquetMode()
@@ -1753,7 +1753,7 @@ class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit, ChannelS
                elif not (ref.flags & eServiceReference.isMarker): # no marker
                        cur_root = self.getRoot()
                        if not cur_root or not (cur_root.flags & eServiceReference.isGroup):
-                               playingref = self.session.nav.getCurrentlyPlayingServiceReference()
+                               playingref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                                if playingref is None or playingref != ref:
                                        self.session.nav.playService(ref)
                                        config.radio.lastservice.value = ref.toString()
index 5bd9b33..2e02ccd 100644 (file)
@@ -172,7 +172,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP
                InfoBarSeek.__init__(self)
                InfoBarPVRState.__init__(self)
 
-               self.oldService = self.session.nav.getCurrentlyPlayingServiceReference()
+               self.oldService = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                self.session.nav.stopService()
                self["audioLabel"] = Label("n/a")
                self["subtitleLabel"] = Label("")
@@ -430,7 +430,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP
                        return
                choices = [(_("Exit"), "exit"), (_("Continue playing"), "play")]
                if self.physicalDVD:
-                       cur = self.session.nav.getCurrentlyPlayingServiceReference()
+                       cur = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                        if cur and not cur.toString().endswith(harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD())):
                            choices.insert(0,(_("Play DVD"), "playPhysical" ))
                self.session.openWithCallback(self.exitCB, ChoiceBox, title=_("Leave DVD player?"), list = choices)
@@ -520,7 +520,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP
                        self.FileBrowserClosed(harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD()))
 
        def FileBrowserClosed(self, val):
-               curref = self.session.nav.getCurrentlyPlayingServiceReference()
+               curref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                print "FileBrowserClosed", val
                if val is None:
                        self.askLeavePlayer()
index 4a729ba..6db8c32 100644 (file)
@@ -158,7 +158,7 @@ class EPGSelection(Screen):
                l.recalcEntrySize()
                if self.type == EPG_TYPE_MULTI:
                        l.fillMultiEPG(self.services, self.ask_time)
-                       l.moveToService(self.session.nav.getCurrentlyPlayingServiceReference())
+                       l.moveToService(self.session.nav.getCurrentlyPlayingServiceOrGroup())
                elif self.type == EPG_TYPE_SINGLE:
                        service = self.currentService
                        self["Service"].newService(service.ref)
index 209be6b..ebd7be9 100644 (file)
@@ -118,14 +118,14 @@ class InfoBar(InfoBarBase, InfoBarShowHide,
                self.rds_display.show()  # in InfoBarRdsDecoder
 
        def showMovies(self, defaultRef=None):
-               self.lastservice = self.session.nav.getCurrentlyPlayingServiceReference()
+               self.lastservice = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                self.session.openWithCallback(self.movieSelected, Screens.MovieSelection.MovieSelection, defaultRef)
 
        def movieSelected(self, service):
                ref = self.lastservice
                del self.lastservice
                if service is None:
-                       if ref and not self.session.nav.getCurrentlyPlayingServiceReference():
+                       if ref and not self.session.nav.getCurrentlyPlayingServiceOrGroup():
                                self.session.nav.playService(ref)
                else:
                        self.session.open(MoviePlayer, service, slist = self.servicelist, lastservice = ref)
@@ -167,7 +167,7 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \
                        x.__init__(self)
 
                self.servicelist = slist
-               self.lastservice = lastservice or session.nav.getCurrentlyPlayingServiceReference()
+               self.lastservice = lastservice or session.nav.getCurrentlyPlayingServiceOrGroup()
                session.nav.playService(service)
                self.cur_service = service
                self.returning = False
@@ -221,7 +221,7 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \
                answer = answer and answer[1]
 
                if answer in ("quitanddelete", "quitanddeleteconfirmed"):
-                       ref = self.session.nav.getCurrentlyPlayingServiceReference()
+                       ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                        serviceHandler = enigma.eServiceCenter.getInstance()
                        if answer == "quitanddelete":
                                msg = ''
@@ -251,7 +251,7 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \
                if answer in ("quit", "quitanddeleteconfirmed"):
                        self.close()
                elif answer == "movielist":
-                       ref = self.session.nav.getCurrentlyPlayingServiceReference()
+                       ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                        self.returning = True
                        self.session.openWithCallback(self.movieSelected, Screens.MovieSelection.MovieSelection, ref)
                        self.session.nav.stopService()
@@ -278,7 +278,7 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \
                        return
                if not playing :
                        return
-               ref = self.session.nav.getCurrentlyPlayingServiceReference()
+               ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                if ref:
                        delResumePoint(ref)
                self.handleLeave(config.usage.on_movie_eof.value)
@@ -362,7 +362,7 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \
                pass
 
        def showMovies(self):
-               ref = self.session.nav.getCurrentlyPlayingServiceReference()
+               ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                self.playingservice = ref # movie list may change the currently playing
                self.session.openWithCallback(self.movieSelected, Screens.MovieSelection.MovieSelection, ref)
 
@@ -379,7 +379,7 @@ class MoviePlayer(InfoBarBase, InfoBarShowHide, \
                        ref = self.playingservice
                        del self.playingservice
                        # no selection? Continue where we left off
-                       if ref and not self.session.nav.getCurrentlyPlayingServiceReference():
+                       if ref and not self.session.nav.getCurrentlyPlayingServiceOrGroup():
                                self.session.nav.playService(ref)
 
        def nextPlaylistService(self, service):
index 0c35d9e..8e9a34d 100644 (file)
@@ -50,7 +50,7 @@ def isStandardInfoBar(self):
 def setResumePoint(session):
        global resumePointCache, resumePointCacheLast
        service = session.nav.getCurrentService()
-       ref = session.nav.getCurrentlyPlayingServiceReference()
+       ref = session.nav.getCurrentlyPlayingServiceOrGroup()
        if (service is not None) and (ref is not None): # and (ref.type != 1):
                # ref type 1 has its own memory...
                seek = service.seek()
@@ -85,7 +85,7 @@ def delResumePoint(ref):
 
 def getResumePoint(session):
        global resumePointCache
-       ref = session.nav.getCurrentlyPlayingServiceReference()
+       ref = session.nav.getCurrentlyPlayingServiceOrGroup()
        if (ref is not None) and (ref.type != 1):
                try:
                        entry = resumePointCache[ref.toString()]
@@ -525,7 +525,7 @@ class InfoBarChannelSelection:
 
        def isPlayable(self, ref):
                if not (ref.flags & eServiceReference.isMarker):
-                       cur_running = self.session.nav.getCurrentlyPlayingServiceReference(False)
+                       cur_running = self.session.nav.getCurrentlyPlayingServiceReference()
                        if not cur_running:
                                cur_running = eServiceReference()
                        info = eServiceCenter.getInstance().info(ref)
@@ -576,7 +576,7 @@ class InfoBarSimpleEventView:
                epglist = [ ]
                self.epglist = epglist
                service = self.session.nav.getCurrentService()
-               ref = self.session.nav.getCurrentlyPlayingServiceReference()
+               ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                info = service.info()
                ptr=info.getEvent(0)
                if ptr:
@@ -680,7 +680,7 @@ class InfoBarEPG:
 
        def zapToService(self, service, preview = False, zapback = False):
                if self.servicelist.startServiceRef is None:
-                       self.servicelist.startServiceRef = self.session.nav.getCurrentlyPlayingServiceReference()
+                       self.servicelist.startServiceRef = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                if service is not None:
                        if self.servicelist.getRoot() != self.epg_bouquet: #already in correct bouquet?
                                self.servicelist.clearPath()
@@ -789,7 +789,7 @@ class InfoBarEPG:
                self.serviceSel = None
 
        def openSingleServiceEPG(self):
-               ref=self.session.nav.getCurrentlyPlayingServiceReference()
+               ref=self.session.nav.getCurrentlyPlayingServiceOrGroup()
                if ref:
                        if self.servicelist.getMutableList() is not None: # bouquet in channellist
                                current_path = self.servicelist.getRoot()
@@ -855,7 +855,7 @@ class InfoBarEPG:
                self.openEventView()
 
        def openEventView(self):
-               ref = self.session.nav.getCurrentlyPlayingServiceReference()
+               ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                self.getNowNext()
                epglist = self.epglist
                if not epglist:
@@ -1696,7 +1696,7 @@ class InfoBarPiP:
                                del self.session.pip
 
        def swapPiP(self):
-               swapservice = self.session.nav.getCurrentlyPlayingServiceReference()
+               swapservice = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                pipref = self.session.pip.getCurrentService()
                if swapservice and pipref and pipref.toString() != swapservice.toString():
                        currentServicePath = self.servicelist.getCurrentServicePath()
@@ -1740,7 +1740,7 @@ class InfoBarInstantRecord:
                        self.recording.remove(self.recording[entry])
 
        def startInstantRecording(self, limitEvent = False):
-               serviceref = self.session.nav.getCurrentlyPlayingServiceReference()
+               serviceref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
 
                # try to get event info
                event = None
@@ -1956,7 +1956,7 @@ class InfoBarSubserviceSelection:
                n = subservices and subservices.getNumberOfSubservices()
                if n and n > 0:
                        selection = -1
-                       ref = self.session.nav.getCurrentlyPlayingServiceReference()
+                       ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                        idx = 0
                        while idx < n:
                                if subservices.getSubservice(idx).toString() == ref.toString():
@@ -1982,7 +1982,7 @@ class InfoBarSubserviceSelection:
                n = subservices and subservices.getNumberOfSubservices()
                selection = 0
                if n and n > 0:
-                       ref = self.session.nav.getCurrentlyPlayingServiceReference()
+                       ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                        tlist = []
                        idx = 0
                        while idx < n:
index 266e76a..1e10d1a 100644 (file)
@@ -706,7 +706,7 @@ class MovieSelection(Screen, HelpableScreen, SelectionEventInfo, InfoBarBase):
                return False
 
        def goToPlayingService(self):
-               service = self.session.nav.getCurrentlyPlayingServiceReference()
+               service = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                if service:
                        path = service.getPath()
                        if path:
index 2f7d2fb..93b4a6a 100644 (file)
@@ -297,7 +297,7 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport):
                del self.feinfo
                del self.service
 
-               self.session.postScanService = session.nav.getCurrentlyPlayingServiceReference()
+               self.session.postScanService = session.nav.getCurrentlyPlayingServiceOrGroup()
 
                self["actions"] = NumberActionMap(["SetupActions", "MenuActions"],
                {
@@ -888,7 +888,7 @@ class ScanSimple(ConfigListScreen, Screen, CableTransponderSearchSupport):
                        "menu": self.doCloseRecursive,
                }, -2)
 
-               self.session.postScanService = session.nav.getCurrentlyPlayingServiceReference()
+               self.session.postScanService = session.nav.getCurrentlyPlayingServiceOrGroup()
 
                self.list = []
                tlist = []
index 03e0bce..73b6483 100644 (file)
@@ -104,9 +104,9 @@ class ServiceInfo(Screen):
 
        def information(self):
                if self.type == TYPE_SERVICE_INFO:
-                       if self.session.nav.getCurrentlyPlayingServiceReference():
-                               name = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference(False)).getServiceName()
-                               refstr = self.session.nav.getCurrentlyPlayingServiceReference(False).toString()
+                       if self.session.nav.getCurrentlyPlayingServiceOrGroup():
+                               name = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()).getServiceName()
+                               refstr = self.session.nav.getCurrentlyPlayingServiceReference().toString()
                        else:
                                name = _("N/A")
                                refstr = _("N/A")
index 628a93a..89ee324 100644 (file)
@@ -20,7 +20,7 @@ class ServiceStopScreen:
                return pipavailable
                
        def stopService(self):          
-               self.oldref = self.session.nav.getCurrentlyPlayingServiceReference()
+               self.oldref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                self.session.nav.stopService()
                if self.pipAvailable():
                        if self.session.pipshown: # try to disable pip
index 446a2a5..1da8da3 100644 (file)
@@ -151,7 +151,7 @@ class SleepTimerEdit(Screen):
                
        def useServiceTime(self):
                remaining = None
-               ref = self.session.nav.getCurrentlyPlayingServiceReference()
+               ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                if ref:
                        path = ref.getPath()
                        if path: # Movie
index 33eb3fb..361dc45 100644 (file)
@@ -53,7 +53,7 @@ class Standby(Screen):
                if self.session.current_dialog:
                        if self.session.current_dialog.ALLOW_SUSPEND == Screen.SUSPEND_STOPS:
                                #get currently playing service reference
-                               self.prev_running_service = self.session.nav.getCurrentlyPlayingServiceReference()
+                               self.prev_running_service = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                                #stop actual played dvb-service
                                self.session.nav.stopService()
                        elif self.session.current_dialog.ALLOW_SUSPEND == Screen.SUSPEND_PAUSES:
index 3bcc3c4..e65498a 100644 (file)
@@ -22,7 +22,7 @@ class SubservicesQuickzap(InfoBarBase, InfoBarShowHide, InfoBarMenu, \
                                InfoBarExtensions, InfoBarAudioSelection:
                        x.__init__(self)
 
-               self.restoreService = self.session.nav.getCurrentlyPlayingServiceReference()
+               self.restoreService = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                
                self["CurrentSubserviceNumber"] = Label("")
                self.currentSubserviceNumberLabel = self["CurrentSubserviceNumber"]
index ea4e4c1..9be4549 100644 (file)
@@ -244,7 +244,7 @@ class TimerEditList(Screen):
                                event = info.getEvent(0)
 
                # FIXME only works if already playing a service
-               serviceref = ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference())
+               serviceref = ServiceReference(self.session.nav.getCurrentlyPlayingServiceOrGroup())
                
                if event is None:       
                        data = (int(time()), int(time() + 60), "", "", None)
index 3ca5dd2..c654489 100644 (file)
@@ -359,7 +359,7 @@ class TimerEntry(Screen, ConfigListScreen):
                                n = event.getNumOfLinkageServices()
                                if n > 1:
                                        tlist = []
-                                       ref = self.session.nav.getCurrentlyPlayingServiceReference()
+                                       ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
                                        parent = self.timer.service_ref.ref
                                        selection = 0
                                        for x in range(n):