Change announcement

This commit is contained in:
Brahim Hadriche committed 2024-09-23 19:05:30 -04:00
1 parent bc7f61e01b
commit cda305d04d
2 files changed
+46 -12

No files matched your search

+24 -6
View File
@@ -33,15 +33,31 @@ function StartWebServer()
m.dialServer@.StartServer() m.dialServer@.StartServer()
end function 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() function ShowAnnouncement()
title = "Announcement" title = "Announcement #2 - web app hot fix"
message = [ message = [
"Hello again!", "Invidious servers continue being blocked by YouTube. https://github.com/iBicha/playlet/issues/400"
"Invidious servers are actively getting blocked by YouTube.", "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.",
`You might see the error message "This helps protect our community. Learn more" when playing a video.`, "How to use:"
"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"
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." "We apologize for the inconvenience."
] ]
@@ -50,6 +66,8 @@ function ShowAnnouncement()
dialog = CreateObject("roSGNode", "SimpleDialog") dialog = CreateObject("roSGNode", "SimpleDialog")
dialog.title = title dialog.title = title
dialog.message = message dialog.message = message
dialog.bulletText = bulletText
dialog.bottomMessage = bottomMessage
dialog.buttons = buttons dialog.buttons = buttons
deviceInfo = CreateObject("roDeviceInfo") deviceInfo = CreateObject("roDeviceInfo")
displaySize = deviceInfo.GetDisplaySize() displaySize = deviceInfo.GetDisplaySize()
@@ -32,14 +32,28 @@ function StartWebServer()
m.dialServer.callfunc("StartServer", invalid) m.dialServer.callfunc("StartServer", invalid)
end function 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() function ShowAnnouncement()
title = "Announcement" title = "Announcement #2 - web app hot fix"
message = [ message = [
"Hello again!" "Invidious servers continue being blocked by YouTube. https://github.com/iBicha/playlet/issues/400"
"Invidious servers are actively getting blocked by YouTube." "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."
"You might see the error message " + chr(34) + "This helps protect our community. Learn more" + chr(34) + " when playing a video." "How to use:"
"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" 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." "We apologize for the inconvenience."
] ]
buttons = [ buttons = [
@@ -48,6 +62,8 @@ function ShowAnnouncement()
dialog = CreateObject("roSGNode", "SimpleDialog") dialog = CreateObject("roSGNode", "SimpleDialog")
dialog.title = title dialog.title = title
dialog.message = message dialog.message = message
dialog.bulletText = bulletText
dialog.bottomMessage = bottomMessage
dialog.buttons = buttons dialog.buttons = buttons
deviceInfo = CreateObject("roDeviceInfo") deviceInfo = CreateObject("roDeviceInfo")
displaySize = deviceInfo.GetDisplaySize() displaySize = deviceInfo.GetDisplaySize()