From 4a488a352ba2ad30829819f2873521a1ccd5d52d Mon Sep 17 00:00:00 2001 From: 1hitsong <3330318+1hitsong@users.noreply.github.com> Date: Tue, 23 May 2023 21:07:18 -0400 Subject: [PATCH] Convert input event to global queue --- source/Main.brs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/source/Main.brs b/source/Main.brs index d6171043..fdc56b79 100644 --- a/source/Main.brs +++ b/source/Main.brs @@ -597,18 +597,14 @@ sub Main (args as dynamic) as void if msg.IsInput() info = msg.GetInfo() if info.DoesExist("mediatype") and info.DoesExist("contentid") - video = CreateVideoPlayerGroup(info.contentId) - if video <> invalid - sceneManager.callFunc("pushScene", video) - else - dialog = createObject("roSGNode", "Dialog") - dialog.id = "OKDialog" - dialog.title = tr("Not found") - dialog.message = tr("The requested content does not exist on the server") - dialog.buttons = [tr("OK")] - m.scene.dialog = dialog - m.scene.dialog.observeField("buttonSelected", m.port) - end if + inputEventVideo = { + id: info.contentId, + type: "video" + } + + m.global.queueManager.callFunc("clear") + m.global.queueManager.callFunc("push", inputEventVideo) + m.global.queueManager.callFunc("playQueue") end if end if else if isNodeEvent(msg, "dataReturned")