Revert back to not using a temp PO token

This commit is contained in:
WardPearce
2025-01-05 20:30:47 +13:00
parent adea79cbb8
commit fc534561ea
5 changed files with 12 additions and 10 deletions
+2 -2
View File
@@ -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.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "Materialious",
"version": "1.6.25",
"version": "1.6.26",
"description": "Modern material design for Invidious.",
"author": {
"name": "Ward Pearce",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "materialious",
"version": "1.6.25",
"version": "1.6.26",
"private": true,
"scripts": {
"dev": "vite dev",
+7 -5
View File
@@ -52,15 +52,17 @@ export async function patchYoutubeJs(videoId: string): Promise<VideoPlay> {
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;
}
+1 -1
View File
@@ -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")