[GH-ISSUE #592] Extra metadata beyond title/URI #374

Closed
opened 2026-02-27 19:30:17 +03:00 by kerem · 10 comments
Owner

Originally created by @micronova-jb on GitHub (Feb 1, 2021).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/592

Hello! First, I'd like to say thanks creating and maintaining such a great project. I am using librespot as part of a different project I'm working on, and we're trying to get metadata from the songs played on Spotify. The typical console output is the song title, URI, and its length in milliseconds. Does Librespot itself gather more data than this? I'm having a difficult time figuring this out. I have found plenty of other projects that accomplish this goal, but they tend to be outside of the scope of what I'm working on.

The metadata that would be great to have would be:

  • Song title
  • Title of the album the song is from
  • Name of the artist of the song
  • Album cover art (not necessary, but would be cool)

Is it possible to accomplish this with just Librespot? Does Spotify keep that information hidden? I appreciate any help/answers you can provide!

Originally created by @micronova-jb on GitHub (Feb 1, 2021). Original GitHub issue: https://github.com/librespot-org/librespot/issues/592 Hello! First, I'd like to say thanks creating and maintaining such a great project. I am using librespot as part of a different project I'm working on, and we're trying to get metadata from the songs played on Spotify. The typical console output is the song title, URI, and its length in milliseconds. Does Librespot itself gather more data than this? I'm having a difficult time figuring this out. I have found plenty of other projects that accomplish this goal, but they tend to be outside of the scope of what I'm working on. The metadata that would be great to have would be: - [x] Song title - [ ] Title of the album the song is from - [ ] Name of the artist of the song - [ ] Album cover art (not necessary, but would be cool) Is it possible to accomplish this with just Librespot? Does Spotify keep that information hidden? I appreciate any help/answers you can provide!
kerem 2026-02-27 19:30:17 +03:00
Author
Owner

@Johannesd3 commented on GitHub (Feb 1, 2021):

Are you using librespot as library in other Rust code, or are you just invoking the application?

<!-- gh-comment-id:771225484 --> @Johannesd3 commented on GitHub (Feb 1, 2021): Are you using librespot as library in other Rust code, or are you just invoking the application?
Author
Owner

@micronova-jb commented on GitHub (Feb 2, 2021):

I'm calling it via something like "librespot -n 'test audio' --verbose".
I'm not integrating it into other rust code

On Mon, Feb 1, 2021, 6:11 PM Johannesd3 notifications@github.com wrote:

Are you using librespot as library in other Rust code, or are you just
invoking the application?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/librespot-org/librespot/issues/592#issuecomment-771225484,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQ3EEILXISGAJKUJFMZD2L3S44YKBANCNFSM4W5SYGDA
.

<!-- gh-comment-id:771247613 --> @micronova-jb commented on GitHub (Feb 2, 2021): I'm calling it via something like "librespot -n 'test audio' --verbose". I'm not integrating it into other rust code On Mon, Feb 1, 2021, 6:11 PM Johannesd3 <notifications@github.com> wrote: > Are you using librespot as library in other Rust code, or are you just > invoking the application? > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/librespot-org/librespot/issues/592#issuecomment-771225484>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AQ3EEILXISGAJKUJFMZD2L3S44YKBANCNFSM4W5SYGDA> > . >
Author
Owner

@Johannesd3 commented on GitHub (Feb 2, 2021):

The simplest solution is probably to use the official Web API.

<!-- gh-comment-id:771778359 --> @Johannesd3 commented on GitHub (Feb 2, 2021): The simplest solution is probably to use the [official Web API](https://developer.spotify.com/documentation/web-api/reference/#category-player).
Author
Owner

@ashthespy commented on GitHub (Feb 2, 2021):

Is it possible to accomplish this with just Librespot? Does Spotify keep that information hidden? I appreciate any help/answers you can provide!

Yeah it is (with librespot the library), but won't be added to Librespot the binary for reasons - #7

I wrapped Librespot into a little daemon a while back that exposes metadata on a udp socket. Currently all you seek should be included. There are some prebuilt releases, if you want to give it a whirl..

"track_id":
"track_name":
"artist_id":
"artist_name":
"album_id": 
"album_name":
"duration_ms": 
"albumartId": 
"position_ms": 
<!-- gh-comment-id:771845058 --> @ashthespy commented on GitHub (Feb 2, 2021): > Is it possible to accomplish this with just Librespot? Does Spotify keep that information hidden? I appreciate any help/answers you can provide! Yeah it is (with `librespot` the library), but won't be added to Librespot the binary for reasons - #7 I wrapped Librespot into a [little daemon](https://github.com/ashthespy/Vollibrespot) a while back that exposes metadata on a udp socket. Currently all you seek should be included. There are some prebuilt releases, if you want to give it a whirl.. ``` "track_id": "track_name": "artist_id": "artist_name": "album_id": "album_name": "duration_ms": "albumartId": "position_ms": ```
Author
Owner

@micronova-jb commented on GitHub (Feb 2, 2021):

Thank you both for the responses! I can try both of these out to see which works better for my team's project.
@ashthespy I think I will look into your project first :) I'm basically just using a Raspberry Pi as a Spotify Connect device - is it possible to use your daemon without installing Volumio?

<!-- gh-comment-id:771854980 --> @micronova-jb commented on GitHub (Feb 2, 2021): Thank you both for the responses! I can try both of these out to see which works better for my team's project. @ashthespy I think I will look into your project first :) I'm basically just using a Raspberry Pi as a Spotify Connect device - is it possible to use your daemon without installing Volumio?
Author
Owner

@ashthespy commented on GitHub (Feb 2, 2021):

Sure, you don't need Volumio. Pick the right release version based on which Pi your using (armhf vs armv6).
Have a look at this snippet on how you can read the metadata with NodeJs

<!-- gh-comment-id:771858170 --> @ashthespy commented on GitHub (Feb 2, 2021): Sure, you don't need Volumio. Pick the right release version based on which Pi your using (`armhf` vs `armv6`). Have a look at this snippet on how you can [read the metadata with NodeJs](https://github.com/ashthespy/Volumio-SpotifyConnect/blob/next/SpotConnController.js)
Author
Owner

@micronova-jb commented on GitHub (Jul 14, 2021):

@ashthespy Sorry for the complete radio silence over the past few months! Things got really crazy at work, and I was working on a lot of the other features for our AmpliPi system (neglecting Spotify). I initially couldn't figure out the vollibrespot integration, but after more digging this week, it's working quite well for me! Your daemon does everything I wanted and more - full metadata (including album art), as well as play/pause/seek integration. Just wanted to come back to this issue to properly thank you for your awesome work :)

<!-- gh-comment-id:880097877 --> @micronova-jb commented on GitHub (Jul 14, 2021): @ashthespy Sorry for the complete radio silence over the past few months! Things got really crazy at work, and I was working on a lot of the other features for our AmpliPi system (neglecting Spotify). I initially couldn't figure out the vollibrespot integration, but after more digging this week, it's working quite well for me! Your daemon does everything I wanted and more - full metadata (including album art), as well as play/pause/seek integration. Just wanted to come back to this issue to properly thank you for your awesome work :)
Author
Owner

@kingosticks commented on GitHub (Jul 14, 2021):

@micronova-jb are you distributing librespot with your system? Any sort of integration should include the librespot disclaimer so users know the risks and understand that what they are using is a reverse-engineered solution which may violate Spotfy's ToS. Everything built on librespot should do this but I think it's particuarly important if you are selling something. I assume you are supposed to pay Spotify a heap of cash to officially use their service in a product and then do so using their (non-public) software.

<!-- gh-comment-id:880117153 --> @kingosticks commented on GitHub (Jul 14, 2021): @micronova-jb are you distributing librespot with your system? Any sort of integration should include the [librespot disclaimer](https://github.com/librespot-org/librespot#disclaimer) so users know the risks and understand that what they are using is a reverse-engineered solution which may violate Spotfy's ToS. Everything built on librespot should do this but I think it's particuarly important if you are selling something. I assume you are supposed to pay Spotify a heap of cash to officially use their service in a product and then do so using their (non-public) software.
Author
Owner

@micronova-jb commented on GitHub (Jul 14, 2021):

@kingosticks Yes, we are planning on distributing Librespot as part of our open-source project AmpliPi. Our business model is to sell the hardware that the open-source software runs on. It is a hobbyist project, and our users understand the limitations; we have recently updated some of our documentation to make it clear that Spotify support is provided by Librespot, including a link to the project and disclaimer in our README. The only units that currently exist in the field belong to AmpliPi developers.

<!-- gh-comment-id:880172228 --> @micronova-jb commented on GitHub (Jul 14, 2021): @kingosticks Yes, we are planning on distributing Librespot as part of our open-source project [AmpliPi](https://github.com/micro-nova/AmpliPi). Our business model is to sell the hardware that the open-source software runs on. It is a hobbyist project, and our users understand the limitations; we have recently updated some of our documentation to make it clear that Spotify support is provided by Librespot, including a link to the project and disclaimer in our [README](https://github.com/micro-nova/AmpliPi/blob/master/README.md#features). The only units that currently exist in the field belong to AmpliPi developers.
Author
Owner

@ashthespy commented on GitHub (Jul 15, 2021):

@micronova-jb That is good to hear, I have a few more things to sort out regarding sharing of the sink, will happen when I find time ;-)

<!-- gh-comment-id:880544061 --> @ashthespy commented on GitHub (Jul 15, 2021): @micronova-jb That is good to hear, I have a few more things to sort out regarding sharing of the sink, will happen when I find time ;-)
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/librespot#374
No description provided.