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)
- 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.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):