no alt text

This commit is contained in:
2025-11-24 00:11:50 +00:00
parent 1b4755b401
commit fe41f17f72
2 changed files with 4 additions and 2 deletions

View File

@@ -72,7 +72,7 @@ func (store *Store) ListeningTo(c *gin.Context) {
c.JSON(200, gin.H{ c.JSON(200, gin.H{
"playing": true, "playing": true,
"song_name": item.Name, "song_name": item.Name,
"song_url": item.URI, "song_url": item.PreviewURL,
"artist_name": artistName, "artist_name": artistName,
"album_image": imgURL, "album_image": imgURL,
}) })

View File

@@ -12,6 +12,7 @@
album_image: "/img/Untitled.png", album_image: "/img/Untitled.png",
artist_name: "", artist_name: "",
song_name: "", song_name: "",
song_url: "",
playing: false, playing: false,
async fetchNowPlaying() { async fetchNowPlaying() {
try { try {
@@ -22,6 +23,7 @@
this.album_image = data.album_image; this.album_image = data.album_image;
this.artist_name = data.artist_name; this.artist_name = data.artist_name;
this.song_name = data.song_name; this.song_name = data.song_name;
this.song_url = data.song_url;
this.playing = data.playing; this.playing = data.playing;
} catch (err) { } catch (err) {
console.error("Failed to fetch Spotify data", err); console.error("Failed to fetch Spotify data", err);
@@ -77,7 +79,7 @@
x-init="fetchNowPlaying()" x-init="fetchNowPlaying()"
class="spotify-card" class="spotify-card"
> >
<img :src="album_image" class="album-img" alt="Album Art" /> <img :src="album_image" class="album-img" alt="" />
<div class="spotify-info"> <div class="spotify-info">
<div x-text="song_name || 'No song playing'"></div> <div x-text="song_name || 'No song playing'"></div>
<div x-text="artist_name"></div> <div x-text="artist_name"></div>