diff --git a/backend/handlers/handle_spotify.go b/backend/handlers/handle_spotify.go
index 70df62a..4f7e5db 100644
--- a/backend/handlers/handle_spotify.go
+++ b/backend/handlers/handle_spotify.go
@@ -72,7 +72,7 @@ func (store *Store) ListeningTo(c *gin.Context) {
c.JSON(200, gin.H{
"playing": true,
"song_name": item.Name,
- "song_url": item.URI,
+ "song_url": item.PreviewURL,
"artist_name": artistName,
"album_image": imgURL,
})
diff --git a/html/index.html b/html/index.html
index c99c476..e80db5d 100644
--- a/html/index.html
+++ b/html/index.html
@@ -12,6 +12,7 @@
album_image: "/img/Untitled.png",
artist_name: "",
song_name: "",
+ song_url: "",
playing: false,
async fetchNowPlaying() {
try {
@@ -22,6 +23,7 @@
this.album_image = data.album_image;
this.artist_name = data.artist_name;
this.song_name = data.song_name;
+ this.song_url = data.song_url;
this.playing = data.playing;
} catch (err) {
console.error("Failed to fetch Spotify data", err);
@@ -77,7 +79,7 @@
x-init="fetchNowPlaying()"
class="spotify-card"
>
-
+