from TimerEdit import TimerEditList
from TimerEntry import TimerEntry
from ServiceReference import ServiceReference
from TimerEdit import TimerEditList
from TimerEntry import TimerEntry
from ServiceReference import ServiceReference
elif isinstance(service, eServiceReference) or isinstance(service, str):
self.type = EPG_TYPE_SINGLE
self["key_yellow"] = Button()
self["key_blue"] = Button()
self.currentService=ServiceReference(service)
elif isinstance(service, eServiceReference) or isinstance(service, str):
self.type = EPG_TYPE_SINGLE
self["key_yellow"] = Button()
self["key_blue"] = Button()
self.currentService=ServiceReference(service)
"yellow": self.yellowButtonPressed,
"blue": self.blueButtonPressed,
"info": self.infoKeyPressed,
"yellow": self.yellowButtonPressed,
"blue": self.blueButtonPressed,
"info": self.infoKeyPressed,
"input_date_time": self.enterDateTime,
"nextBouquet": self.nextBouquet,
"prevBouquet": self.prevBouquet
"input_date_time": self.enterDateTime,
"nextBouquet": self.nextBouquet,
"prevBouquet": self.prevBouquet
- if self.type == EPG_TYPE_MULTI or self.type == EPG_TYPE_SIMILAR:
- cur = self["list"].getCurrent()
- event = cur[0]
- service = cur[1]
- else:
- event = self["list"].getCurrent()
- service = self.currentService
+ cur = self["list"].getCurrent()
+ event = cur[0]
+ service = cur[1]
if event is not None:
if self.type != EPG_TYPE_SIMILAR:
self.session.open(EventViewSimple, event, service, self.eventViewCallback, self.openSimilarList)
if event is not None:
if self.type != EPG_TYPE_SIMILAR:
self.session.open(EventViewSimple, event, service, self.eventViewCallback, self.openSimilarList)
l.fillMultiEPG(self.services, self.ask_time)
elif self.type == EPG_TYPE_SINGLE:
l.fillMultiEPG(self.services, self.ask_time)
elif self.type == EPG_TYPE_SINGLE:
l.fillSimilarList(self.currentService, self.eventid)
def eventViewCallback(self, setEvent, setService, val):
l.fillSimilarList(self.currentService, self.eventid)
def eventViewCallback(self, setEvent, setService, val):
- if self.zapFunc != None:
- self.closeRecursive = True
- ref = self["list"].getCurrent()[1]
- self.zapFunc(ref.ref)
+ if self.zapFunc and self["key_red"].getText() == "Zap":
+ lst = self["list"]
+ count = lst.getCurrentChangeCount()
+ if count == 0:
+ self.closeRecursive = True
+ ref = lst.getCurrent()[1]
+ self.zapFunc(ref.ref)
- if self.type == EPG_TYPE_SINGLE:
- event = self["list"].getCurrent()
- serviceref = self.currentService
- else:
- cur = self["list"].getCurrent()
- event = cur[0]
- serviceref = cur[1]
+ cur = self["list"].getCurrent()
+ event = cur[0]
+ serviceref = cur[1]
self.session.openWithCallback(self.timerEditFinished, TimerEntry, newEntry)
def timerEditFinished(self, answer):
self.session.openWithCallback(self.timerEditFinished, TimerEntry, newEntry)
def timerEditFinished(self, answer):
self["now_button_sel"].show()
self["now_button"].hide()
else:
self["now_button"].show()
self["now_button_sel"].hide()
self["now_button_sel"].show()
self["now_button"].hide()
else:
self["now_button"].show()
self["now_button_sel"].hide()