From cda305d04d07f8ae0347110f47abfaeccdfa047b Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Mon, 23 Sep 2024 19:05:30 -0400 Subject: [PATCH] Change announcement --- playlet-lib/src/components/MainScene.bs | 30 +++++++++++++++---- .../src/components/MainScene.transpiled.brs | 28 +++++++++++++---- 2 files changed, 46 insertions(+), 12 deletions(-) diff --git a/playlet-lib/src/components/MainScene.bs b/playlet-lib/src/components/MainScene.bs index 724f5d72..38259cf4 100644 --- a/playlet-lib/src/components/MainScene.bs +++ b/playlet-lib/src/components/MainScene.bs @@ -33,15 +33,31 @@ function StartWebServer() m.dialServer@.StartServer() end function +function GetDeviceFriendlyName() as string + deviceInfo = CreateObject("roDeviceInfo") + deviceFriendlyName = deviceInfo.GetFriendlyName() + if StringUtils.IsNullOrEmpty(deviceFriendlyName) + deviceFriendlyName = "Roku TV" + end if + return deviceFriendlyName +end function + function ShowAnnouncement() - title = "Announcement" + title = "Announcement #2 - web app hot fix" message = [ - "Hello again!", - "Invidious servers are actively getting blocked by YouTube.", - `You might see the error message "This helps protect our community. Learn more" when playing a video.`, - "This is a known issue and the Invidious dev team is working to fix it." - "See more information at https://github.com/iv-org/invidious/issues/4734" + "Invidious servers continue being blocked by YouTube. https://github.com/iBicha/playlet/issues/400" + "A temporary workaround has been implemented which relies on your Roku device instead of Invidious for streaming data. This workaround is limited, doesn't always work, and doesn't have captions.", + "How to use:" + ] + + bulletText = [ + `Go to the "Remote" screen, and open Playlet Web App in your browser` + "In the web app, tap the video you want to play" + `Choose "Play on ${GetDeviceFriendlyName()} (HOT FIX)"` + ] + + bottomMessage = [ "We apologize for the inconvenience." ] @@ -50,6 +66,8 @@ function ShowAnnouncement() dialog = CreateObject("roSGNode", "SimpleDialog") dialog.title = title dialog.message = message + dialog.bulletText = bulletText + dialog.bottomMessage = bottomMessage dialog.buttons = buttons deviceInfo = CreateObject("roDeviceInfo") displaySize = deviceInfo.GetDisplaySize() diff --git a/playlet-lib/src/components/MainScene.transpiled.brs b/playlet-lib/src/components/MainScene.transpiled.brs index 2f0adb7c..000a86db 100644 --- a/playlet-lib/src/components/MainScene.transpiled.brs +++ b/playlet-lib/src/components/MainScene.transpiled.brs @@ -32,14 +32,28 @@ function StartWebServer() m.dialServer.callfunc("StartServer", invalid) end function +function GetDeviceFriendlyName() as string + deviceInfo = CreateObject("roDeviceInfo") + deviceFriendlyName = deviceInfo.GetFriendlyName() + if StringUtils_IsNullOrEmpty(deviceFriendlyName) + deviceFriendlyName = "Roku TV" + end if + return deviceFriendlyName +end function + function ShowAnnouncement() - title = "Announcement" + title = "Announcement #2 - web app hot fix" message = [ - "Hello again!" - "Invidious servers are actively getting blocked by YouTube." - "You might see the error message " + chr(34) + "This helps protect our community. Learn more" + chr(34) + " when playing a video." - "This is a known issue and the Invidious dev team is working to fix it." - "See more information at https://github.com/iv-org/invidious/issues/4734" + "Invidious servers continue being blocked by YouTube. https://github.com/iBicha/playlet/issues/400" + "A temporary workaround has been implemented which relies on your Roku device instead of Invidious for streaming data. This workaround is limited, doesn't always work, and doesn't have captions." + "How to use:" + ] + bulletText = [ + "Go to the " + chr(34) + "Remote" + chr(34) + " screen, and open Playlet Web App in your browser" + "In the web app, tap the video you want to play" + ("Choose " + chr(34) + "Play on " + bslib_toString(GetDeviceFriendlyName()) + " (HOT FIX)" + chr(34)) + ] + bottomMessage = [ "We apologize for the inconvenience." ] buttons = [ @@ -48,6 +62,8 @@ function ShowAnnouncement() dialog = CreateObject("roSGNode", "SimpleDialog") dialog.title = title dialog.message = message + dialog.bulletText = bulletText + dialog.bottomMessage = bottomMessage dialog.buttons = buttons deviceInfo = CreateObject("roDeviceInfo") displaySize = deviceInfo.GetDisplaySize()