diff --git a/accounts/music.js b/accounts/music.js
new file mode 100644
index 0000000..8a22e36
--- /dev/null
+++ b/accounts/music.js
@@ -0,0 +1,39 @@
+import Soundcloud from 'lucida/streamers/soundcloud/main.js'
+let clientId = process.env.SOUNDCLOUD_CLIENT_ID;
+
+let sc = new Soundcloud({
+ // oauthToken: clientId
+})
+
+async function search(query) {
+ let data = sc.search(query);
+ return data;
+}
+async function download(url, res) {
+ if (!url) {
+ return res.status(400).send('Please provide a SoundCloud track URL as ?url=')
+ }
+
+ try {
+ const info = await sc.getByUrl(url)
+
+ if (info.type !== 'track') {
+ return res.status(400).send('URL is not a SoundCloud track')
+ }
+
+ const { stream, mimeType, sizeBytes } = await info.getStream()
+
+ res.setHeader('Content-Type', mimeType)
+ if (sizeBytes) {
+ res.setHeader('Content-Length', sizeBytes.toString())
+ }
+ res.setHeader('Cache-Control', 'no-cache')
+
+ stream.pipe(res)
+ } catch (err) {
+ console.error('Stream error:', err)
+ res.status(500).send(err.message || 'Failed to stream track')
+ }
+}
+
+export { search, download };
\ No newline at end of file
diff --git a/accounts/profile.js b/accounts/profile.js
index e06f5a7..3bc1775 100755
--- a/accounts/profile.js
+++ b/accounts/profile.js
@@ -235,7 +235,7 @@ async function generateAccountPage(name, cookie, admin) {
modifiedHTML = modifiedHTML.replaceAll("{{ user_pfp }}", userData.pfp_url || "/img/user.svg");
modifiedHTML = modifiedHTML.replaceAll("{{ custom_css }}", userData.custom_css || "");
modifiedHTML = modifiedHTML.replaceAll("{{ online_time }}", dayjs(userData.last_login).fromNow());
- modifiedHTML = modifiedHTML.replaceAll("{{ played_games }}", buildGameHTML(userData));
+ modifiedHTML = modifiedHTML.replaceAll("{{ username }}", sanitizeHtml(userData.username, allowNone));
let badges_html = "";
if (userData.badges !== null) {
diff --git a/html/profile.html b/html/profile.html
index 45ab2c8..49a5242 100755
--- a/html/profile.html
+++ b/html/profile.html
@@ -4,64 +4,99 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
+
+
-
{{ name }}'s Profile | Selenite
+
+
-
-
-
-
-

-
-
{{ name }}
-
{{ badges }}
-
Joined {{ join_date }}
-
Last online {{ online_time }}
-
-
-
About Me
- {{ about }}
-
+
+
click to enter
this user selected a song, please mute the tab if you don't want to listen
+
{{ name }}'s profile
+
+
+
+
{{ name }}
+
/u/{{ username }}
+
{{ badges }}
-
-
Top Games:
-
- {{ played_games }}
-
+
+
{{ song_title }}
+
{{ song_artist }}
+
+
+

+

+
-
-
+
+
Joined {{ join_date }}
+ Last online {{ online_time }}
+
+
+
+ about me
+ {{ about }}
+
diff --git a/html/profile_edit.html b/html/profile_edit.html
index 413eef8..9b1d41d 100755
--- a/html/profile_edit.html
+++ b/html/profile_edit.html
@@ -5,18 +5,65 @@
https://coolors.co/10002b-240046-3c096c-5a189a-7b2cbf-9d4edd-c77dff-e0aaff -->
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
+
+
{{ name }}'s Profile | Selenite
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
{{ name }}'s profile
+
+
+
+
+
+
{{ name }}
+

+
+
/u/{{ username }}
+
{{ badges }}
-
- {{ css_edit }}
+
+
{{ song_title }}
+

+
+
{{ song_artist }}
+
+
+

+

+
-
-

+
+
Joined {{ join_date }}
+ Last online {{ online_time }}
+
+
+
+
+
about me

-
-
-
{{ name }}
-

-
-
{{ badges }}
-
Joined {{ join_date }}
-
Last online {{ online_time }}
-
-
-
-
Bio
-

-
-
{{ about }}
-
-
-
Top Games:
-
- {{ played_games }}
-
-
-
-
-
-
-
+ {{ about }}
+