From 5c5fe194404f084610e23fb116bf72fdc60d771a Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Sat, 27 Jun 2026 14:28:46 -0400 Subject: [PATCH] Add "isLivingRoomDeeplink" param to /player payload, and remove auto-refresh of browser based tokens browser based tokens are fallbacks now. --- CHANGELOG.md | 2 +- .../SettingsScreen/ClearPoTokensControl.bs | 30 ------------------- .../SettingsScreen/ClearPoTokensControl.xml | 19 ------------ .../Services/Innertube/PlayerEndpoint.bs | 7 ++++- playlet-lib/src/config/preferences.json5 | 9 +----- playlet-web/src/App.svelte | 12 -------- playlet-web/src/lib/Api/PoTokenMinter.ts | 6 ++-- .../SettingControls/MintPoTokenControl.svelte | 2 +- playlet-web/src/lib/ensureDevicePoToken.ts | 4 +-- 9 files changed, 14 insertions(+), 77 deletions(-) delete mode 100644 playlet-lib/src/components/Screens/SettingsScreen/ClearPoTokensControl.bs delete mode 100644 playlet-lib/src/components/Screens/SettingsScreen/ClearPoTokensControl.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index 98f79f61..d641e714 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Attempt to fix `No valid bitrates` error by adding PoToken generation in web app +- Attempt to fix `No valid bitrates` error by adding PoToken generation in server and web app ### Removed diff --git a/playlet-lib/src/components/Screens/SettingsScreen/ClearPoTokensControl.bs b/playlet-lib/src/components/Screens/SettingsScreen/ClearPoTokensControl.bs deleted file mode 100644 index 15fb8ac2..00000000 --- a/playlet-lib/src/components/Screens/SettingsScreen/ClearPoTokensControl.bs +++ /dev/null @@ -1,30 +0,0 @@ -import "pkg:/components/Dialog/DialogUtils.bs" -import "pkg:/components/Services/Innertube/PoTokens.bs" -import "pkg:/source/utils/FocusManagement.bs" -import "pkg:/source/utils/Locale.bs" - -function Init() - m.top.focusable = true - m.top.itemSpacings = [8] - m.button = m.top.findNode("Button") - m.button.observeField("buttonSelected", FuncName(OnButtonSelected)) -end function - -function OnFocusChange() as void - if not m.top.focus - return - end if - NodeSetFocus(m.button, true) -end function - -function BindPreference(_preferences as object, _key as string) - ' Do nothing -end function - -function OnButtonSelected() - Innertube.PoTokens.ClearAllPoTokens() - DialogUtils.ShowDialogEx({ - message: Tr(Locale.Settings.PoTokensCleared) - title: Tr(Locale.Generic.Success) - }) -end function diff --git a/playlet-lib/src/components/Screens/SettingsScreen/ClearPoTokensControl.xml b/playlet-lib/src/components/Screens/SettingsScreen/ClearPoTokensControl.xml deleted file mode 100644 index 01c4dce9..00000000 --- a/playlet-lib/src/components/Screens/SettingsScreen/ClearPoTokensControl.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - diff --git a/playlet-web/src/lib/ensureDevicePoToken.ts b/playlet-web/src/lib/ensureDevicePoToken.ts index 2eb837c5..f74d4f74 100644 --- a/playlet-web/src/lib/ensureDevicePoToken.ts +++ b/playlet-web/src/lib/ensureDevicePoToken.ts @@ -2,8 +2,8 @@ import { PoTokenMinter } from "lib/Api/PoTokenMinter"; import { addToast } from "lib/Toast"; // Mints for the current identity if needed, surfacing the outcome as a toast. -export async function ensureDevicePoTokenWithToast(force = false) { - const result = await PoTokenMinter.ensureDevicePoToken(force); +export async function ensureDevicePoTokenWithToast() { + const result = await PoTokenMinter.ensureDevicePoToken(); switch (result.status) { case "minted": addToast("PoToken minted on device", "success");