[GH-ISSUE #278] Include uris for artists and album in metadata event #167

Closed
opened 2026-02-28 14:25:57 +03:00 by kerem · 2 comments
Owner

Originally created by @dmca-glasgow on GitHub (Dec 30, 2025).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/278

Hello,

Thanks for a great project.

I am working on a docker compose project with go-librespot, mopidy and a small node.js app to juggle the two and normalise websocket events.

One thing I've noticed I can't do with go-librespot that I can with mopidy is create a "new-track" event like this with album and artist uris:

"track": {
  "uri": "spotify:track:4nzyOwogJuWn1s6QuGFZ6w",
  "name": "My Name Is Jonas",
  "length": 204293,
  "artists": [
    {
      "uri": "spotify:artist:3jOstUTkEu2JkjvRdBA5Gu",
      "name": "Weezer"
    }
  ],
  "album": {
    "uri": "spotify:album:1xpGyKyV26uPstk1Elgp9Q",
    "name": "Weezer"
  }
}

This allows me to create a timeline where I can link off to the artist(s) and album.

Is this possible?

Cheers.

Originally created by @dmca-glasgow on GitHub (Dec 30, 2025). Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/278 Hello, Thanks for a great project. I am working on a docker compose project with go-librespot, mopidy and a small node.js app to juggle the two and normalise websocket events. One thing I've noticed I can't do with go-librespot that I can with mopidy is create a "new-track" event like this with album and artist uris: ```js "track": { "uri": "spotify:track:4nzyOwogJuWn1s6QuGFZ6w", "name": "My Name Is Jonas", "length": 204293, "artists": [ { "uri": "spotify:artist:3jOstUTkEu2JkjvRdBA5Gu", "name": "Weezer" } ], "album": { "uri": "spotify:album:1xpGyKyV26uPstk1Elgp9Q", "name": "Weezer" } } ``` This allows me to create a timeline where I can link off to the artist(s) and album. Is this possible? Cheers.
kerem 2026-02-28 14:25:57 +03:00
Author
Owner

@devgianlu commented on GitHub (Jan 1, 2026):

The websocket metadata event provides the track URI, you can then use that in combination with the /web-api/<...> endopoint to get stuff from the Spotify Web API.

<!-- gh-comment-id:3703979958 --> @devgianlu commented on GitHub (Jan 1, 2026): The websocket `metadata` event provides the track URI, you can then use that in combination with the `/web-api/<...>` endopoint to get stuff from the Spotify Web API.
Author
Owner

@daviestar commented on GitHub (Jan 2, 2026):

Aha, why didn't I think of that. I've got that hooked up, thanks.

<!-- gh-comment-id:3705116441 --> @daviestar commented on GitHub (Jan 2, 2026): Aha, why didn't I think of that. I've got that hooked up, thanks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/go-librespot#167
No description provided.