-from Tools import RedirectOutput
+from Tools import RedirectOutput, RedirectTime
from enigma import runMainloop, eDVBDB, eTimer, quitMainloop, eDVBVolumecontrol, \
getDesktop, ePythonConfigQuery, eAVSwitch, eWindow, eServiceEvent
from tools import *
if callback is not None:
callback(*retval)
- def execBegin(self, first=True):
+ def execBegin(self, first=True, do_show = True):
assert not self.in_exec
self.in_exec = True
c = self.current_dialog
-
+
# when this is an execbegin after a execend of a "higher" dialog,
# popSummary already did the right thing.
if first:
c.execBegin()
# when execBegin opened a new dialog, don't bother showing the old one.
- if c == self.current_dialog:
+ if c == self.current_dialog and do_show:
c.show()
-
+
def execEnd(self, last=True):
assert self.in_exec
self.in_exec = False
def pushCurrent(self):
if self.current_dialog is not None:
- self.dialog_stack.append(self.current_dialog)
+ self.dialog_stack.append((self.current_dialog, self.current_dialog.shown))
self.execEnd(last=False)
-
+
def popCurrent(self):
if len(self.dialog_stack):
- self.current_dialog = self.dialog_stack.pop()
- self.execBegin(first=False)
+ (self.current_dialog, do_show) = self.dialog_stack.pop()
+ self.execBegin(first=False, do_show=do_show)
else:
self.current_dialog = None
else:
self.scartDialog.switchToTV()
+from enigma import eDVBCIInterfaces
+
def runScreenTest():
plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
ePythonConfigQuery.setQueryFunc(configfile.getResolvedKey)
+# eDVBCIInterfaces.getInstance().setDescrambleRules(0 # Slot Number
+# ,( ["1:0:1:24:4:85:C00000:0:0:0:"], #service_list
+# ["PREMIERE"], #provider_list,
+# [] #caid_list
+# ));
+
def runNextScreen(session, screensToRun, *result):
if result:
quitMainloop(*result)
from time import time
from Tools.DreamboxHardware import setFPWakeuptime
+ #get next record timer start time
nextRecordingTime = session.nav.RecordTimer.getNextRecordingTime()
- if nextRecordingTime != -1:
- if (nextRecordingTime - time() < 330): # no time to switch box back on
- setFPWakeuptime(time() + 30) # so switch back on in 30 seconds
+ #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:
+ if (startTime - nowTime < 330): # no time to switch box back on
+ setFPWakeuptime(nowTime + 30) # so switch back on in 30 seconds
else:
- setFPWakeuptime(nextRecordingTime - (300))
-
+ setFPWakeuptime(startTime - 300)
session.nav.stopService()
session.nav.shutdown()