From 4e315c993a5099c69b3c8eb6ca4d93e00f732dfc Mon Sep 17 00:00:00 2001 From: sky Date: Sun, 17 Aug 2025 19:14:11 -0400 Subject: [PATCH] mobile, idek --- accounts/music.js | 146 +++++++++++++++++++++++++-- accounts/profile.js | 23 ++++- html/profile.html | 11 ++- html/profile_edit.html | 11 +-- html/users.html | 2 +- package-lock.json | 219 ++++++++++++++++++++++++----------------- 6 files changed, 293 insertions(+), 119 deletions(-) diff --git a/accounts/music.js b/accounts/music.js index fb9a59e..5492fc1 100644 --- a/accounts/music.js +++ b/accounts/music.js @@ -9,17 +9,145 @@ async function search(query) { let data = sc.search(query); return data; } -async function download(url) { - try { - const info = await sc.getByUrl(url); +// so um fuck lucida +// based on https://github.com/imputnet/cobalt/blob/58ea4aed01383ead74d5e32e75335eddc2f015be/api/src/processing/services/soundcloud.js - const { stream } = await info.getStream(); +const cachedID = { + version: '', + id: '' +} - return stream.path; - } catch (err) { - console.error('Stream error:', err) - return(err.message || 'Failed to stream track') - } +async function findClientID() { + try { + const sc = await fetch('https://soundcloud.com/').then(r => r.text()).catch(() => {}); + const scVersion = String(sc.match(/ - + @@ -50,6 +50,7 @@ let music = {{ is_music }}; let audioObject; if(music) { + document.body.classList = "enter-on"; let url = "{{ song_url }}"; audioObject = new Audio(url); audioObject.addEventListener("loadeddata", () => { @@ -63,6 +64,7 @@ setTimeout(() => { audioObject.play(); audioObject.loop = true; + document.body.classList = ""; }, 500) setTimeout( () => { document.getElementById("enter").style.display = "none"; @@ -91,8 +93,9 @@ } }); document.getElementById("playbar").addEventListener("input", (e) => { - audioObject.currentTime = document.getElementById("playbar").value/1000*audioObject.duration; - document.getElementById("playbar").value = (audioObject.currentTime / audioObject.duration) * 1000; + let value = document.getElementById("playbar").value; + audioObject.currentTime = value/1000*audioObject.duration; + document.getElementById("playbar").value = value; }); audioObject.addEventListener("timeupdate", (e) => { document.getElementById("totalLength").innerText = `${Math.floor(audioObject.duration/60)}:${String(Math.floor(audioObject.duration%60)).padStart(2, "0")}` @@ -131,7 +134,7 @@

Last online {{ online_time }}

-
+

about me

{{ about }}

diff --git a/html/profile_edit.html b/html/profile_edit.html index cfeffa4..e54fcf3 100755 --- a/html/profile_edit.html +++ b/html/profile_edit.html @@ -34,7 +34,7 @@ - + @@ -423,15 +423,6 @@

{{ song_title }}

{{ song_artist }}

-
-

0:00

- -

9:99

-
-
- - -

Joined {{ join_date }}

diff --git a/html/users.html b/html/users.html index d1660c2..2c93324 100644 --- a/html/users.html +++ b/html/users.html @@ -34,7 +34,7 @@ - +