import time
import os
+from Components.config import config, currentConfigSelectionElement
+
# hack alert!
from Menu import MainMenu, mdom
bouquetlist = serviceHandler.list(bouquet)
if not bouquetlist is None:
while number:
- bouquet = bouquetlist.getNext()
+ bouquet = self.servicelist.appendDVBTypes(bouquetlist.getNext())
if not bouquet.valid(): #check end of list
break
if ((bouquet.flags & eServiceReference.flagDirectory) != eServiceReference.flagDirectory):
def __init__(self):
self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions",
{
- "showEPGList": (self.openSingleServiceEPG, _("show EPG...")),
+ "showEPGList": (self.showEPG, _("show EPG...")),
})
+ def showEPG(self):
+ if currentConfigSelectionElement(config.usage.epgtoggle) == "yes":
+ self.openSingleServiceEPG()
+ else:
+ self.showEPGList()
+
def showEPGList(self):
bouquets = self.servicelist.getBouquetList()
if bouquets is None:
if info:
self.showEPGList()
+ def openEventView(self):
+ try:
+ self.epglist = [ ]
+ service = self.session.nav.getCurrentService()
+ info = service.info()
+ ptr=info.getEvent(0)
+ if ptr:
+ self.epglist.append(ptr)
+ ptr=info.getEvent(1)
+ if ptr:
+ self.epglist.append(ptr)
+ if len(self.epglist) > 0:
+ self.session.open(EventView, self.epglist[0], ServiceReference(ref), self.eventViewCallback)
+ except:
+ pass
+
def openSingleServiceEPG(self):
ref=self.session.nav.getCurrentlyPlayingServiceReference()
ptr=eEPGCache.getInstance()
self.session.openWithCallback(self.singleEPGCallback, EPGSelection, ref)
else: # try to show now/next
print 'no epg for service', ref.toString()
- try:
- self.epglist = [ ]
- service = self.session.nav.getCurrentService()
- info = service.info()
- ptr=info.getEvent(0)
- if ptr:
- self.epglist.append(ptr)
- ptr=info.getEvent(1)
- if ptr:
- self.epglist.append(ptr)
- if len(self.epglist) > 0:
- self.session.open(EventView, self.epglist[0], ServiceReference(ref), self.eventViewCallback)
- except:
- pass
+
def openBouquetEPG(self, bouquet):
ptr=eEPGCache.getInstance()
"seekBack": (self.seekBack, "skip backward"),
"seekBackUp": (self.seekBackUp, "skip backward"),
+ "movieList": (self.showMovies, "movie list"),
"up": (self.showMovies, "movie list"),
"down": (self.showMovies, "movie list")
})