X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/e5c5859121a0b99607b618dc31e2e0588510785b..15ffc7a1a79fc23554ebefc5f6765e8bed11d6e8:/mytest.py diff --git a/mytest.py b/mytest.py index 38e18d69..3bdbcf2d 100644 --- a/mytest.py +++ b/mytest.py @@ -476,12 +476,15 @@ class AutoScartControl: self.scartDialog.switchToTV() from enigma import eDVBCIInterfaces +from Screens.Ci import CiHandler def runScreenTest(): plugins.readPluginList(resolveFilename(SCOPE_PLUGINS)) session = Session(desktop = getDesktop(0), summary_desktop = getDesktop(1), navigation = Navigation()) + CiHandler.setSession(session) + screensToRun = [ ] for p in plugins.getPlugins(PluginDescriptor.WHERE_WIZARD): @@ -525,17 +528,18 @@ def runScreenTest(): from time import time from Tools.DreamboxHardware import setFPWakeuptime - #get next record timer start time - nextRecordingTime = session.nav.RecordTimer.getNextRecordingTime() - #get next zap timer start time - nextZapTime = session.nav.RecordTimer.getNextZapTime() #get currentTime nowTime = time() - if nextZapTime != -1 and nextRecordingTime != -1: - startTime = nextZapTime < nextRecordingTime and nextZapTime or nextRecordingTime - else: - startTime = nextZapTime != -1 and nextZapTime or nextRecordingTime - if startTime != -1: + wakeupList = [ + x for x in + [session.nav.RecordTimer.getNextRecordingTime(), + session.nav.RecordTimer.getNextZapTime(), + plugins.getNextWakeupTime()] + if x != -1 + ] + wakeupList.sort() + if len(wakeupList): + startTime = wakeupList.pop(0) if (startTime - nowTime < 330): # no time to switch box back on setFPWakeuptime(nowTime + 30) # so switch back on in 30 seconds else: