Пример #1
0
def gotThreadMsg(msg):
    msg = HttpDeamonThread.PlayerData.pop()
    global playbackIsRunning

    if not playbackIsRunning:
        data = msg[0]

        listViewList = data["listViewList"]
        currentIndex = data["currentIndex"]
        libraryName = data["libraryName"]
        autoPlayMode = data["autoPlayMode"]
        resumeMode = data["resumeMode"]
        playbackMode = data["playbackMode"]
        forceResume = data["forceResume"]

        # load skin data here as well
        startEnvironment()

        # save liveTvData
        saveLiveTv(global_session.nav.getCurrentlyPlayingServiceReference())

        playbackIsRunning = True

        # now we start the player
        global_session.openWithCallback(restoreLiveTv,
                                        DP_Player,
                                        listViewList,
                                        currentIndex,
                                        libraryName,
                                        autoPlayMode,
                                        resumeMode,
                                        playbackMode,
                                        forceResume=forceResume)
Пример #2
0
def startPlayback(data, stopPlaybackFirst=False):
    listViewList = data["listViewList"]
    currentIndex = data["currentIndex"]
    libraryName = data["libraryName"]
    autoPlayMode = data["autoPlayMode"]
    resumeMode = data["resumeMode"]
    playbackMode = data["playbackMode"]
    forceResume = data["forceResume"]
    subtitleData = data["subtitleData"]

    if stopPlaybackFirst:
        stopPlayback()

        # save liveTvData
    saveLiveTv(global_session.nav.getCurrentlyPlayingServiceReference())

    if not isinstance(global_session.current_dialog, DP_Player):
        # now we start the player
        global_session.open(
            DP_Player,
            listViewList,
            currentIndex,
            libraryName,
            autoPlayMode,
            resumeMode,
            playbackMode,
            forceResume=forceResume,
            subtitleData=subtitleData,
            startedByRemotePlayer=True,
        )
Пример #3
0
def DPS_MainMenu(*args, **kwargs):
    import DP_MainMenu

    # save liveTvData
    saveLiveTv(global_session.nav.getCurrentlyPlayingServiceReference())

    # this loads the skin
    startEnvironment()

    return DP_MainMenu.DPS_MainMenu(*args, **kwargs)
Пример #4
0
    def __init__(self, session, allowOverride=True):
        printl("", self, "S")
        DPH_Screen.__init__(self, session)
        DPH_ScreenHelper.__init__(self)

        self.allowOverride = allowOverride

        self.selectionOverride = None
        printl("selectionOverride:" + str(self.selectionOverride), self, "D")
        self.session = session

        # save liveTvData
        saveLiveTv(self.session.nav.getCurrentlyPlayingServiceReference())

        self.initScreen("main_menu")
        self.initMenu()

        if self.g_horizontal_menu:
            self.setHorMenuElements(depth=2)
            self.translateNames()

        self["title"] = StaticText()

        self["menu"] = List(enableWrapAround=True)

        self["actions"] = HelpableActionMap(
            self, "DP_MainMenuActions", {
                "ok": (self.okbuttonClick, ""),
                "left": (self.left, ""),
                "right": (self.right, ""),
                "up": (self.up, ""),
                "down": (self.down, ""),
                "cancel": (self.cancel, ""),
            }, -2)

        if config.plugins.dreamplex.stopLiveTvOnStartup.value:
            self.session.nav.stopService()

        self.onFirstExecBegin.append(self.onExec)
        self.onLayoutFinish.append(self.finishLayout)
        self.onShown.append(self.checkSelectionOverride)

        printl("", self, "C")
Пример #5
0
	def __init__(self, session, allowOverride=True):
		printl("", self, "S")
		DPH_Screen.__init__(self, session)
		DPH_ScreenHelper.__init__(self)

		self.allowOverride = allowOverride

		self.selectionOverride = None
		printl("selectionOverride:" +str(self.selectionOverride), self, "D")
		self.session = session

		# save liveTvData
		saveLiveTv(self.session.nav.getCurrentlyPlayingServiceReference())

		self.initScreen("main_menu")
		self.initMenu()

		if self.g_horizontal_menu:
			self.setHorMenuElements(depth=2)
			self.translateNames()

		self["title"] = StaticText()

		self["menu"]= List(enableWrapAround=True)

		self["actions"] = HelpableActionMap(self, "DP_MainMenuActions",
			{
				"ok":		(self.okbuttonClick, ""),
				"left":		(self.left, ""),
				"right":	(self.right, ""),
				"up":		(self.up, ""),
				"down":		(self.down, ""),
				"cancel":	(self.cancel, ""),
			}, -2)
		
		if config.plugins.dreamplex.stopLiveTvOnStartup.value:
			self.session.nav.stopService()

		self.onFirstExecBegin.append(self.onExec)
		self.onLayoutFinish.append(self.finishLayout)
		self.onShown.append(self.checkSelectionOverride)

		printl("", self, "C")
Пример #6
0
def startPlayback(data, stopPlaybackFirst=False):
	listViewList    = data["listViewList"]
	currentIndex    = data["currentIndex"]
	libraryName     = data["libraryName"]
	autoPlayMode    = data["autoPlayMode"]
	resumeMode      = data["resumeMode"]
	playbackMode    = data["playbackMode"]
	forceResume     = data["forceResume"]
	subtitleData    = data["subtitleData"]

	if stopPlaybackFirst:
		stopPlayback()

	# save liveTvData
	saveLiveTv(global_session.nav.getCurrentlyPlayingServiceReference())

	if not isinstance(global_session.current_dialog, DP_Player):
		# now we start the player
		global_session.open(DP_Player, listViewList, currentIndex, libraryName, autoPlayMode, resumeMode, playbackMode, forceResume=forceResume, subtitleData=subtitleData, startedByRemotePlayer=True)
Пример #7
0
def gotThreadMsg(msg):
	msg = HttpDeamonThread.PlayerData.pop()

	data = msg[0]

	listViewList    = data["listViewList"]
	currentIndex    = data["currentIndex"]
	libraryName     = data["libraryName"]
	autoPlayMode    = data["autoPlayMode"]
	resumeMode      = data["resumeMode"]
	playbackMode    = data["playbackMode"]
	forceResume     = data["forceResume"]

	# load skin data here as well
	startEnvironment()

	# save liveTvData
	saveLiveTv(global_session.nav.getCurrentlyPlayingServiceReference())

	# now we start the player
	global_session.openWithCallback(restoreLiveTv, DP_Player, listViewList, currentIndex, libraryName, autoPlayMode, resumeMode, playbackMode, forceResume=forceResume)