From 75d16e6ce47dfff5575bf3edc8969857628654e1 Mon Sep 17 00:00:00 2001 From: Samidy Date: Mon, 9 Mar 2026 03:03:29 +0300 Subject: [PATCH] feat: music videos --- functions/album/[id].js | 2 +- functions/playlist/[id].js | 2 +- functions/track/[id].js | 2 +- index.html | 31 ++- js/accounts/pocketbase.js | 17 +- js/api.js | 359 +++++++++++++++++------- js/app.js | 5 +- js/db.js | 39 ++- js/desktop/discord-rpc.js | 2 +- js/events.js | 118 +++++--- js/hls-downloader.js | 107 ++++++++ js/music-api.js | 29 +- js/player.js | 195 +++++++------ js/ui.js | 547 ++++++++++++++++++++++++------------- js/utils.js | 27 +- styles.css | 155 ++++++++++- 16 files changed, 1189 insertions(+), 448 deletions(-) create mode 100644 js/hls-downloader.js diff --git a/functions/album/[id].js b/functions/album/[id].js index 95f6fbf..8a5e2a9 100644 --- a/functions/album/[id].js +++ b/functions/album/[id].js @@ -84,7 +84,7 @@ class ServerAPI { getCoverUrl(id, size = '1280') { if (!id) return ''; - const formattedId = id.replace(/-/g, '/'); + const formattedId = String(id).replace(/-/g, '/'); return `https://resources.tidal.com/images/${formattedId}/${size}x${size}.jpg`; } } diff --git a/functions/playlist/[id].js b/functions/playlist/[id].js index ae41d1a..c20a6ac 100644 --- a/functions/playlist/[id].js +++ b/functions/playlist/[id].js @@ -85,7 +85,7 @@ class ServerAPI { getCoverUrl(id, size = '1080') { if (!id) return ''; - const formattedId = id.replace(/-/g, '/'); + const formattedId = String(id).replace(/-/g, '/'); return `https://resources.tidal.com/images/${formattedId}/${size}x${size}.jpg`; } } diff --git a/functions/track/[id].js b/functions/track/[id].js index fad3f21..e96fa94 100644 --- a/functions/track/[id].js +++ b/functions/track/[id].js @@ -98,7 +98,7 @@ class ServerAPI { getCoverUrl(id, size = '1280') { if (!id) return ''; - const formattedId = id.replace(/-/g, '/'); + const formattedId = String(id).replace(/-/g, '/'); return `https://resources.tidal.com/images/${formattedId}/${size}x${size}.jpg`; } diff --git a/index.html b/index.html index fd69136..b711543 100644 --- a/index.html +++ b/index.html @@ -36,13 +36,13 @@ - +
+ + @@ -2365,6 +2371,9 @@
+
+
+
@@ -2403,6 +2412,7 @@

Favorites

+ @@ -2475,6 +2485,9 @@
+
+
+
@@ -3177,6 +3190,10 @@

Albums

+