Exemplo n.º 1
0
    def __init__(self, desktop=None, summary_desktop=None, navigation=None):
        self.desktop = desktop
        self.summary_desktop = summary_desktop
        self.nav = navigation
        self.delay_timer = eTimer()
        self.delay_timer_conn = self.delay_timer.timeout.connect(
            self.processDelay)

        self.current_player = None
        self.current_dialog = None
        self.next_dialog = None

        self.dialog_stack = []
        self.fading_dialogs = []
        self.summary_stack = []
        self.summary = None

        self.in_exec = False

        self.screen = SessionGlobals(self)

        self.shutdown = False

        for p in plugins.getPlugins(PluginDescriptor.WHERE_SESSIONSTART):
            p(reason=0, session=self)
Exemplo n.º 2
0
	def __init__(self, desktop=None, navigation=None):
		print('Session init')
		self.desktop = desktop
		self.nav = navigation
		self.current_dialog = None
		self.dialog_stack = []
		from Screens.SessionGlobals import SessionGlobals
		self.screen = SessionGlobals(self)
Exemplo n.º 3
0
	def __init__(self, desktop=None, summary_desktop=None, navigation=None):
		self.desktop = desktop
		self.summary_desktop = summary_desktop
		self.nav = navigation
		self.delay_timer = enigma.eTimer()
		self.delay_timer.callback.append(self.processDelay)
		self.current_dialog = None
		self.dialog_stack = []
		self.summary_stack = []
		self.summary = None
		self.in_exec = False
		self.screen = SessionGlobals(self)
		for p in plugins.getPlugins(PluginDescriptor.WHERE_SESSIONSTART):
			try:
				p(reason=0, session=self)
			except Exception:
				print("StartEnigma] Plugin raised exception at WHERE_SESSIONSTART")
				print_exc()
Exemplo n.º 4
0
    def __init__(self, desktop=None, summary_desktop=None, navigation=None):
        self.desktop = desktop
        self.summary_desktop = summary_desktop
        self.nav = navigation
        self.delay_timer = eTimer()
        self.delay_timer.callback.append(self.processDelay)

        self.current_dialog = None

        self.dialog_stack = []
        self.summary_stack = []
        self.summary = None

        self.in_exec = False

        self.screen = SessionGlobals(self)

        for p in plugins.getPlugins(PluginDescriptor.WHERE_SESSIONSTART):
            p(reason=0, session=self)
Exemplo n.º 5
0
    def __init__(self, desktop=None, summary_desktop=None, navigation=None):
        self.desktop = desktop
        self.summary_desktop = summary_desktop
        self.nav = navigation
        self.delay_timer = enigma.eTimer()
        self.delay_timer.callback.append(self.processDelay)

        self.current_dialog = None

        self.dialog_stack = []
        self.summary_stack = []
        self.summary = None

        self.in_exec = False

        self.screen = SessionGlobals(self)

        ##### hack for Openwebif - Create folders & symlink
        from enigma import eEnv
        from Tools.Directories import fileExists
        import os
        origwebifpath = eEnv.resolve(
            '${libdir}/enigma2/python/Plugins/Extensions/WebInterface')
        hookpath = eEnv.resolve(
            '${libdir}/enigma2/python/Plugins/Extensions/OpenWebif/pluginshook.src'
        )
        if not os.path.islink(origwebifpath + "/WebChilds/Toplevel.py"
                              ) and os.path.exists(hookpath):
            print "[OpenWebif] hooking original webif plugins"

            cleanuplist = [
                "/__init__.py", "/__init__.pyo", "/__init__.pyc",
                "/WebChilds/__init__.py", "/WebChilds/__init__.pyo",
                "/WebChilds/__init__.pyc", "/WebChilds/External/__init__.py",
                "/WebChilds/External/__init__.pyo",
                "/WebChilds/External/__init__.pyc", "/WebChilds/Toplevel.py",
                "/WebChilds/Toplevel.pyo"
                "/WebChilds/Toplevel.pyc"
            ]

            for cleanupfile in cleanuplist:
                if fileExists(origwebifpath + cleanupfile):
                    os.remove(origwebifpath + cleanupfile)

            if not os.path.exists(origwebifpath + "/WebChilds/External"):
                os.makedirs(origwebifpath + "/WebChilds/External")
            open(origwebifpath + "/__init__.py", "w").close()
            open(origwebifpath + "/WebChilds/__init__.py", "w").close()
            open(origwebifpath + "/WebChilds/External/__init__.py",
                 "w").close()

            os.symlink(hookpath, origwebifpath + "/WebChilds/Toplevel.py")
        ##########################################################

        for p in plugins.getPlugins(PluginDescriptor.WHERE_SESSIONSTART):
            try:
                p(reason=0, session=self)
            except:
                print "Plugin raised exception at WHERE_SESSIONSTART"
                import traceback
                traceback.print_exc()