diff --git a/materialious/android/app/build.gradle b/materialious/android/app/build.gradle index 0e6f17f0..fb41e883 100644 --- a/materialious/android/app/build.gradle +++ b/materialious/android/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "us.materialio.app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 76 - versionName "1.6.25" + versionCode 77 + versionName "1.6.26" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/materialious/electron/package.json b/materialious/electron/package.json index 1185a433..63fcb0e5 100644 --- a/materialious/electron/package.json +++ b/materialious/electron/package.json @@ -1,6 +1,6 @@ { "name": "Materialious", - "version": "1.6.25", + "version": "1.6.26", "description": "Modern material design for Invidious.", "author": { "name": "Ward Pearce", diff --git a/materialious/package.json b/materialious/package.json index c65bc336..d6319e0d 100644 --- a/materialious/package.json +++ b/materialious/package.json @@ -1,6 +1,6 @@ { "name": "materialious", - "version": "1.6.25", + "version": "1.6.26", "private": true, "scripts": { "dev": "vite dev", diff --git a/materialious/src/lib/patches/youtubejs.ts b/materialious/src/lib/patches/youtubejs.ts index 950bef22..36d61735 100644 --- a/materialious/src/lib/patches/youtubejs.ts +++ b/materialious/src/lib/patches/youtubejs.ts @@ -52,15 +52,17 @@ export async function patchYoutubeJs(videoId: string): Promise { const poTokenCache = get(poTokenCacheStore); if (!poTokenCache) { const visitorData = ProtoUtils.encodeVisitorData(Utils.generateRandomString(11), Math.floor(Date.now() / 1000)); + const poToken = await getPo(visitorData); + + if (!poToken) { + throw new Error('Unable to generate PO token'); + } tokens = { visitor_data: visitorData, - po_token: BG.PoToken.generatePlaceholder(visitorData) + po_token: poToken }; - getPo(visitorData).then((webPo) => { - tokens.po_token = webPo as string; - poTokenCacheStore.set(tokens); - }); + poTokenCacheStore.set(tokens); } else { tokens = poTokenCache; } diff --git a/update_versions.py b/update_versions.py index 80b03f8a..062841bf 100644 --- a/update_versions.py +++ b/update_versions.py @@ -5,7 +5,7 @@ import json import os import re -LATEST_VERSION = "1.6.25" +LATEST_VERSION = "1.6.26" WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious") ROOT_PACKAGE = os.path.join(WORKING_DIR, "package.json")