From 274baa2a791f0eed45b00484e675acb06e21d884 Mon Sep 17 00:00:00 2001 From: uimaxbai <61615730+uimaxbai@users.noreply.github.com> Date: Fri, 17 Apr 2026 22:40:15 +0100 Subject: [PATCH] fix EVERYTHING --- functions/album/[id].js | 5 +- functions/track/[id].js | 5 +- index.html | 54 ++++++++++++- js/HiFi.ts | 91 +++++++++++++++++----- js/api.js | 163 ++++++++++----------------------------- js/app.js | 2 +- js/commandPalette.js | 12 +-- js/content-filter.ts | 6 +- js/platform-detection.ts | 3 + js/player.js | 9 +-- js/settings.js | 51 +++++++++++- js/storage.js | 49 ++++++++++++ js/ui.js | 14 ++-- js/utils.js | 4 +- styles.css | 58 ++++++++++++++ test-search.js | 29 +++++-- 16 files changed, 379 insertions(+), 176 deletions(-) diff --git a/functions/album/[id].js b/functions/album/[id].js index 9c815bb..ccdd72f 100644 --- a/functions/album/[id].js +++ b/functions/album/[id].js @@ -143,7 +143,10 @@ const _cr = [ 'ZXNzZWw=', // essel 'emluZGFnaQ==', // zindagi ].map(atob); -const _isBlockedCopyright = (c) => !!c && _cr.some((s) => c.toLowerCase().includes(s)); +const _isBlockedCopyright = (c) => { + const text = typeof c === 'string' ? c : c?.text; + return !!text && _cr.some((s) => text.toLowerCase().includes(s)); +}; export async function onRequest(context) { const { request, params, env } = context; diff --git a/functions/track/[id].js b/functions/track/[id].js index e734df2..68162fe 100644 --- a/functions/track/[id].js +++ b/functions/track/[id].js @@ -171,7 +171,10 @@ const _cr = [ 'ZXNzZWw=', // essel 'emluZGFnaQ==', // zindagi ].map(atob); -const _isBlockedCopyright = (c) => !!c && _cr.some((s) => c.toLowerCase().includes(s)); +const _isBlockedCopyright = (c) => { + const text = typeof c === 'string' ? c : c?.text; + return !!text && _cr.some((s) => text.toLowerCase().includes(s)); +}; export async function onRequest(context) { const { request, params, env } = context; diff --git a/index.html b/index.html index be50f82..0d46417 100644 --- a/index.html +++ b/index.html @@ -2,6 +2,7 @@
+