That is one of the two possibilities with partnerbox...
Re: Modification EpgList #181
Re: Modification EpgList #182
Posted 13 January 2014 - 21:10
but about I wrote... when is set timer to remote box, there and you want display timer icon in EPG, you must enable it there in config of Partnerbox. But then is all icons displaed by PartnerboxEPGList and not with EPGList => icons are wrong (there are used only 5icons, not as we using 15.
I finished modification PartnerboxEPGList, now I must test it...
Re: Modification EpgList #183
Re: Modification EpgList #184
Re: Modification EpgList #185
Posted 27 January 2014 - 00:31
Proposal.
Add a new options for timer zap:1)wakeup receiver for start timer zap yes/no
2)After event.
If receiver wakeup in deep standby for timer zap-->set flag auto deep standby after event if not key press
--- a/Navigation.py +++ b/Navigation.py @@ -1,5 +1,6 @@ from enigma import eServiceCenter, eServiceReference, eTimer, pNavigation, getBestPlayableServiceReference, iPlayableService from Components.ParentalControl import parentalControl +from Components.config import config from Tools.BoundFunction import boundFunction from Tools.StbHardware import setFPWakeuptime, getFPWakeuptime, getFPWasTimerWakeup from time import time @@ -40,6 +41,12 @@ self.recordshutdowntimer = eTimer() self.recordshutdowntimer.callback.append(self.checkShutdownAfterRecording) self.recordshutdowntimer.start(30000, True) + self.zapshutdowntimer = eTimer() + self.zapshutdowntimer.callback.append(self.checkShutdownAfterZap) + self.zapshutdowntimer.start(35000, True) + else: + config.misc.isNextZapTimerAfterEventActionAuto.value = False + config.misc.isNextZapTimerAfterEventActionAuto.save() def wasTimerWakeup(self): return self.__wasTimerWakeup @@ -48,6 +55,17 @@ if len(self.getRecordings()) or abs(self.RecordTimer.getNextRecordingTime() - time()) <= 360: if not Screens.Standby.inTryQuitMainloop: # not a shutdown messagebox is open RecordTimer.RecordTimerEntry.TryQuitMainloop(False) # start shutdown handling + + def checkShutdownAfterZap(self): + if not len(self.getRecordings()) and not Screens.Standby.inTryQuitMainloop: + for timer in self.RecordTimer.timer_list: + if 0 < timer.begin - time() <= 60*5: + if timer.justplay and timer.wakeup and timer.afterEvent == RecordTimer.AFTEREVENT.AUTO: + config.misc.isNextZapTimerAfterEventActionAuto.value = True + else: + config.misc.isNextZapTimerAfterEventActionAuto.value = False + config.misc.isNextZapTimerAfterEventActionAuto.save() + break def dispatchEvent(self, i): for x in self.event: --- a/RecordTimer.py +++ b/RecordTimer.py @@ -111,7 +111,7 @@ Notifications.AddNotificationWithID("RecordTimerQuitMainloop", Screens.Standby.TryQuitMainloop, 1, onSessionOpenCallback=RecordTimerEntry.stopTryQuitMainloop, default_yes = default_yes) ################################################################# - def __init__(self, serviceref, begin, end, name, description, eit, disabled = False, justplay = False, afterEvent = AFTEREVENT.AUTO, checkOldTimers = False, dirname = None, tags = None, descramble = True, record_ecm = False, always_zap = False): + def __init__(self, serviceref, begin, end, name, description, eit, disabled = False, justplay = False, afterEvent = AFTEREVENT.AUTO, checkOldTimers = False, dirname = None, tags = None, descramble = True, record_ecm = False, always_zap = False, wakeup = True): timer.TimerEntry.__init__(self, int(begin), int(end)) if checkOldTimers == True: @@ -137,6 +137,7 @@ self.start_prepare = 0 self.justplay = justplay self.always_zap = always_zap + self.wakeup = wakeup self.afterEvent = afterEvent self.dirname = dirname self.dirnameHadToFallback = False @@ -146,6 +147,7 @@ self.descramble = descramble self.record_ecm = record_ecm self.wasInStandby = False + self.wasDeepInStandby = False self.log_entries = [] self.resetState() @@ -273,7 +275,8 @@ else: cur_zap_ref = NavigationInstance.instance.getCurrentlyPlayingServiceReference() if cur_zap_ref and not cur_zap_ref.getPath():# we do not zap away if it is no live service - Notifications.AddNotification(MessageBox, _("In order to record a timer, the TV was switched to the recording service!\n"), type=MessageBox.TYPE_INFO, timeout=20) + if cur_zap_ref != self.service_ref.ref: + Notifications.AddNotification(MessageBox, _("In order to record a timer, the TV was switched to the recording service!\n"), type=MessageBox.TYPE_INFO, timeout=20) self.failureCB(True) self.log(5, "zap to recording service") @@ -320,7 +323,7 @@ return True if self.justplay: - if Screens.Standby.inStandby: + if Screens.Standby.inStandby and self.wakeup: self.wasInStandby = True eActionMap.getInstance().bindAction('', -maxint - 1, self.keypress) self.log(11, "wakeup and zap") @@ -331,6 +334,13 @@ Screens.Standby.inStandby.Power() else: self.log(11, "zapping") + if config.misc.isNextZapTimerAfterEventActionAuto.value: + if self.wakeup: + self.wasDeepInStandby = True + eActionMap.getInstance().bindAction('', -maxint - 1, self.keypress) + self.log(5, "set flag auto deep standby after event if not key press") + config.misc.isNextZapTimerAfterEventActionAuto.value = False + config.misc.isNextZapTimerAfterEventActionAuto.save() NavigationInstance.instance.playService(self.service_ref.ref) return True else: @@ -359,21 +369,29 @@ if not self.justplay: NavigationInstance.instance.stopRecordService(self.record_service) self.record_service = None - if self.afterEvent == AFTEREVENT.STANDBY or self.wasInStandby: + if self.always_zap: + timer_type = _("zap and record timer (%s)") % self.name + else: + timer_type = _("record timer (%s)") % self.name + else: + timer_type = _("zap timer (%s)") % self.name + if self.afterEvent == AFTEREVENT.STANDBY or self.wasInStandby and (not self.justplay or self.afterEvent == AFTEREVENT.AUTO): self.keypress() #this unbinds the keypress detection if not Screens.Standby.inStandby: # not already in standby - Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A finished record timer wants to set your\nreceiver to standby. Do that now?"), timeout = 20) - elif self.afterEvent == AFTEREVENT.DEEPSTANDBY: + Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A finished %s\nwants to set your receiver to standby.\nDo that now?") % timer_type, timeout = 20) + elif self.afterEvent == AFTEREVENT.DEEPSTANDBY or self.wasDeepInStandby: + self.keypress() if not Screens.Standby.inTryQuitMainloop: # not a shutdown messagebox is open if Screens.Standby.inStandby: # in standby RecordTimerEntry.TryQuitMainloop() # start shutdown handling without screen else: - Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A finished record timer wants to shut down\nyour receiver. Shutdown now?"), timeout = 20) + Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A finished %s\nwants to set your receiver to deep standby.\nDo that now?") % timer_type, timeout = 20) return True def keypress(self, key=None, flag=1): - if flag and self.wasInStandby: + if flag and (self.wasInStandby or self.wasDeepInStandby): self.wasInStandby = False + self.wasDeepInStandby = False eActionMap.getInstance().unbindAction('', self.keypress) def setAutoincreaseEnd(self, entry = None): @@ -479,6 +497,7 @@ disabled = long(xml.get("disabled") or "0") justplay = long(xml.get("justplay") or "0") always_zap = long(xml.get("always_zap") or "0") + wakeup = long(xml.get("wakeup") or "0") afterevent = str(xml.get("afterevent") or "nothing") afterevent = { "nothing": AFTEREVENT.NONE, @@ -506,7 +525,7 @@ name = xml.get("name").encode("utf-8") #filename = xml.get("filename").encode("utf-8") - entry = RecordTimerEntry(serviceref, begin, end, name, description, eit, disabled, justplay, afterevent, dirname = location, tags = tags, descramble = descramble, record_ecm = record_ecm, always_zap = always_zap) + entry = RecordTimerEntry(serviceref, begin, end, name, description, eit, disabled, justplay, afterevent, dirname = location, tags = tags, descramble = descramble, record_ecm = record_ecm, always_zap = always_zap, wakeup = wakeup) entry.repeated = int(repeated) for l in xml.findall("log"): @@ -670,6 +689,7 @@ list.append(' disabled="' + str(int(timer.disabled)) + '"') list.append(' justplay="' + str(int(timer.justplay)) + '"') list.append(' always_zap="' + str(int(timer.always_zap)) + '"') + list.append(' wakeup="' + str(int(timer.wakeup)) + '"') list.append(' descramble="' + str(int(timer.descramble)) + '"') list.append(' record_ecm="' + str(int(timer.record_ecm)) + '"') list.append('>\n') @@ -697,10 +717,10 @@ file.close() os.rename(self.Filename + ".writing", self.Filename) - def getNextZapTime(self): + def getNextZapTime(self, isWakeup=False): now = time() for timer in self.timer_list: - if not timer.justplay or timer.begin < now: + if not timer.justplay or timer.begin < now or isWakeup and not timer.wakeup: continue return timer.begin return -1 --- a/TimerEntry.py +++ b/TimerEntry.py @@ -53,6 +53,7 @@ def createConfig(self): justplay = self.timer.justplay always_zap = self.timer.always_zap + wakeup = self.timer.wakeup afterevent = { AFTEREVENT.NONE: "nothing", @@ -111,6 +112,8 @@ else: shutdownString = _("shut down") self.timerentry_afterevent = ConfigSelection(choices = [("nothing", _("do nothing")), ("standby", _("go to standby")), ("deepstandby", shutdownString), ("auto", _("auto"))], default = afterevent) + self.timerentry_zapafterevent = ConfigSelection(choices = [("nothing", _("do nothing")),("auto", _("auto"))], default = afterevent) + self.timerentry_wakeup = ConfigYesNo(default = wakeup) self.timerentry_recordingtype = ConfigSelection(choices = [("normal", _("normal")), ("descrambled+ecm", _("descramble and record ecm")), ("scrambled+ecm", _("don't descramble, record ecm"))], default = recordingtype) self.timerentry_type = ConfigSelection(choices = [("once",_("once")), ("repeated", _("repeated"))], default = type) self.timerentry_name = ConfigText(default = self.timer.name, visible_width = 50, fixed_size = False) @@ -188,8 +191,10 @@ self.list.append(self.entryStartTime) self.entryShowEndTime = getConfigListEntry(_("Set end time"), self.timerentry_showendtime) + self.entryWakeup = getConfigListEntry(_("Wakeup receiver for start timer"), self.timerentry_wakeup) if self.timerentry_justplay.value == "zap": self.list.append(self.entryShowEndTime) + self.list.append(self.entryWakeup) self.entryEndTime = getConfigListEntry(_("End time"), self.timerentry_endtime) if self.timerentry_justplay.value != "zap" or self.timerentry_showendtime.value: self.list.append(self.entryEndTime) @@ -206,6 +211,8 @@ self.list.append(self.tagsSet) self.list.append(getConfigListEntry(_("After event"), self.timerentry_afterevent)) self.list.append(getConfigListEntry(_("Recording type"), self.timerentry_recordingtype)) + elif self.timerentry_showendtime.value: + self.list.append(getConfigListEntry(_("After event"), self.timerentry_zapafterevent)) self[widget].list = self.list self[widget].l.setList(self.list) @@ -298,6 +305,7 @@ self.timer.description = self.timerentry_description.value self.timer.justplay = self.timerentry_justplay.value == "zap" self.timer.always_zap = self.timerentry_justplay.value == "zap+record" + self.timer.wakeup = self.timerentry_wakeup.value if self.timerentry_justplay.value == "zap": if not self.timerentry_showendtime.value: self.timerentry_endtime.value = self.timerentry_starttime.value @@ -307,7 +315,7 @@ "deepstandby": AFTEREVENT.DEEPSTANDBY, "standby": AFTEREVENT.STANDBY, "auto": AFTEREVENT.AUTO - }[self.timerentry_afterevent.value] + }[self.timerentry_afterevent.value if not self.timer.justplay else self.timerentry_zapafterevent.value] self.timer.descramble = { "normal": True, "descrambled+ecm": True, --- a/mytest.py +++ b/mytest.py @@ -42,6 +42,7 @@ config.misc.radiopic = ConfigText(default = resolveFilename(SCOPE_CURRENT_SKIN, "radio.mvi")) config.misc.blackradiopic = ConfigText(default = resolveFilename(SCOPE_CURRENT_SKIN, "black.mvi")) config.misc.isNextRecordTimerAfterEventActionAuto = ConfigYesNo(default=False) +config.misc.isNextZapTimerAfterEventActionAuto = ConfigYesNo(default=False) config.misc.useTransponderTime = ConfigYesNo(default=True) config.misc.startCounter = ConfigInteger(default=0) # number of e2 starts... config.misc.standbyCounter = NoSave(ConfigInteger(default=0)) # number of standby @@ -502,7 +503,7 @@ nowTime = time() wakeupList = [ x for x in ((session.nav.RecordTimer.getNextRecordingTime(), 0, session.nav.RecordTimer.isNextRecordAfterEventActionAuto()), - (session.nav.RecordTimer.getNextZapTime(), 1), + (session.nav.RecordTimer.getNextZapTime(True), 1), (plugins.getNextWakeupTime(), 2)) if x[0] != -1 ]
Hello,
I am very interested in this patch, and I don't understand why it has not been included in the latest versions of OpenPLI. I agree with Dima73 about the zap timers and the HDMI CEC. I use Autotimer a lot and it keeps waking up my tv, even when I'm asleep.
Is this patch still working ? Also, I don't know how to install this patch on my dreambox. Could you explain me a little bit ?
Thank you !!
Edited by Johnny Dopp, 27 January 2014 - 00:34.
Re: Modification EpgList #186
Posted 27 January 2014 - 00:44
It appears I was not very clear.
I know this has been included in the timers options. I am talking about setting the "wakeup receiver for start timer zap" to "no" as a default setting for all the upcoming timers. Is it possible ?
Edited by Johnny Dopp, 27 January 2014 - 00:45.
Re: Modification EpgList #187
Posted 27 January 2014 - 16:52
It appears I was not very clear.
I know this has been included in the timers options. I am talking about setting the "wakeup receiver for start timer zap" to "no" as a default setting for all the upcoming timers. Is it possible ?
It is not logical.
GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K
Re: Modification EpgList #188
Posted 27 January 2014 - 20:04
It appears I was not very clear.
I know this has been included in the timers options. I am talking about setting the "wakeup receiver for start timer zap" to "no" as a default setting for all the upcoming timers. Is it possible ?
It is not logical.
May I argue that giving the choice to the user would definitely not be a bad thing.
As it was said already, if you set a zap timer couple of days before, in order not to miss a tv show, and you are not at home or sleeping when it happens, then your TV turns on and make you loose energy, wakes you up or your children which is even worst !
Really, why not add a parameter line where you can choose ?!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users