From dc00c1e14b4f449bc41fcca8160a2edf8048eae8 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Fri, 4 Oct 2024 15:53:32 -0400 Subject: [PATCH] Tweaks --- playlet-lib/src/components/MainScene.bs | 21 +++++-------------- .../Services/Innertube/InnertubeService.bs | 3 ++- playlet-lib/src/config/preferences.json5 | 4 ++-- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/playlet-lib/src/components/MainScene.bs b/playlet-lib/src/components/MainScene.bs index 38259cf4..62ebfddd 100644 --- a/playlet-lib/src/components/MainScene.bs +++ b/playlet-lib/src/components/MainScene.bs @@ -43,22 +43,13 @@ function GetDeviceFriendlyName() as string end function function ShowAnnouncement() - title = "Announcement #2 - web app hot fix" + title = "Announcement #3 - Playlet innertube backend" message = [ - "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." + "Most public Invidious instances don't currently work." + "A new backend to play video data has been added to the settings, and it is enabled by default." + "If you would like to use your Invidious instance for playback, you can change the backend in the settings." + "Thank you." ] buttons = [Tr(Locale.Buttons.OK)] @@ -66,8 +57,6 @@ 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/Services/Innertube/InnertubeService.bs b/playlet-lib/src/components/Services/Innertube/InnertubeService.bs index a204e0e7..fa2945cb 100644 --- a/playlet-lib/src/components/Services/Innertube/InnertubeService.bs +++ b/playlet-lib/src/components/Services/Innertube/InnertubeService.bs @@ -44,6 +44,7 @@ namespace InnertubeService end function function MakePayload(videoId as string) as object + deviceInfo = CreateObject("roDeviceInfo") return { "playbackContext": { "contentPlaybackContext": { @@ -80,7 +81,7 @@ namespace InnertubeService "platform": "MOBILE" "clientFormFactor": "UNKNOWN_FORM_FACTOR" "userInterfaceTheme": "USER_INTERFACE_THEME_LIGHT" - "timeZone": "America/Toronto" + "timeZone": deviceInfo.GetTimeZone() "originalUrl": "https://www.youtube.com" "deviceMake": "Apple" "deviceModel": "iPhone10,6" diff --git a/playlet-lib/src/config/preferences.json5 b/playlet-lib/src/config/preferences.json5 index 11d4017c..88b394f0 100644 --- a/playlet-lib/src/config/preferences.json5 +++ b/playlet-lib/src/config/preferences.json5 @@ -35,7 +35,7 @@ { displayText: "Backend", key: "playback.backend", - description: "The backend used for fetching video data", + description: "The backend used for fetching video data. The Playlet backend is experimental", type: "radio", defaultValue: "playlet", options: [ @@ -44,7 +44,7 @@ value: "invidious", }, { - displayText: "Playlet", + displayText: "Playlet (local)", value: "playlet", }, ],