[GH-ISSUE #43] Output Metadata #32

Closed
opened 2026-02-27 19:28:25 +03:00 by kerem · 26 comments
Owner

Originally created by @sashahilton00 on GitHub (Jan 29, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/43

Issue by balbuze
Sunday Feb 19, 2017 at 18:12 GMT
Originally opened as https://github.com/plietar/librespot/issues/154


Hi!
Not a bug ! Thank you for your great work !
I wrote a plugin for volumio2 using spotify-connect-web and an other new one using librespot.
I managed multi users with 2 instances of librespot
I added some script to check cache size and when limit is reached, purge oldest files in the cache.
Now I would like to add metadata (track name and album art in volumio2. But I need some information on how to get this from librespot.
my repo https://github.com/balbuze/volumio-plugins/tree/master/plugins/music_service/volspotconnect2

Originally created by @sashahilton00 on GitHub (Jan 29, 2018). Original GitHub issue: https://github.com/librespot-org/librespot/issues/43 <a href="https://github.com/balbuze"><img src="https://avatars2.githubusercontent.com/u/12850139?v=4" align="left" width="96" height="96" hspace="10"></img></a> **Issue by [balbuze](https://github.com/balbuze)** _Sunday Feb 19, 2017 at 18:12 GMT_ _Originally opened as https://github.com/plietar/librespot/issues/154_ ---- Hi! Not a bug ! Thank you for your great work ! I wrote a plugin for volumio2 using spotify-connect-web and an other new one using librespot. I managed multi users with 2 instances of librespot I added some script to check cache size and when limit is reached, purge oldest files in the cache. Now I would like to add metadata (track name and album art in volumio2. But I need some information on how to get this from librespot. my repo https://github.com/balbuze/volumio-plugins/tree/master/plugins/music_service/volspotconnect2
kerem 2026-02-27 19:28:25 +03:00
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by plietar
Monday Mar 06, 2017 at 16:46 GMT


From gitter :

@balbuze: when playing only track title is displayed in console. Is there a way to get other metadat such artist, album, album art ?

@plietar: Yes, that information is available. This has been requested many times but I'm not sure yet what is the best way to expose it
[...]
My thought was simply to write that information into a file on disk, and clients can just read it from there. inotify can be used by customers to detect changes
Alternatively a named pipe could be used

@sashahilton00: +1 for named pipe. I actually wrote this feature a while back though I hhink I might have rebased will have a look for it and get back to you

@joerg-krause: Using a named pipe for the metadata sounds like a good idea. shairport-sync uses a pipe, too.

So my issue with named pipes is :

  • Updates only go to a single consumer, I'm not really sure what happens when multiple processes try to read it
  • You can only get updates, not read the current state
  • If there is no consumer then librespot might block when writing to it.

A simple file on the other hand wouldn't have these issues. Consumers can read it at any time, and use inotify to get updates it.

The downside is inotify is less portable (I believe macOS/BSDs have similar mechanisms), and more complicate to use. Clients which don't want that complexity can just read the file periodically.

<!-- gh-comment-id:361260483 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/plietar"><img src="https://avatars0.githubusercontent.com/u/1489775?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [plietar](https://github.com/plietar)** _Monday Mar 06, 2017 at 16:46 GMT_ ---- From gitter : > @balbuze: when playing only track title is displayed in console. Is there a way to get other metadat such artist, album, album art ? > @plietar: Yes, that information is available. This has been requested many times but I'm not sure yet what is the best way to expose it [...] My thought was simply to write that information into a file on disk, and clients can just read it from there. inotify can be used by customers to detect changes Alternatively a named pipe could be used > @sashahilton00: +1 for named pipe. I actually wrote this feature a while back though I hhink I might have rebased will have a look for it and get back to you > @joerg-krause: Using a named pipe for the metadata sounds like a good idea. shairport-sync uses a pipe, too. So my issue with named pipes is : - Updates only go to a single consumer, I'm not really sure what happens when multiple processes try to read it - You can only get updates, not read the current state - If there is no consumer then librespot might block when writing to it. A simple file on the other hand wouldn't have these issues. Consumers can read it at any time, and use inotify to get updates it. The downside is inotify is less portable (I believe macOS/BSDs have similar mechanisms), and more complicate to use. Clients which don't want that complexity can just read the file periodically.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by postacey
Monday Mar 06, 2017 at 22:50 GMT


Hi,
First of all, thank you to everyone who's put in so much work on this!

I've managed to get the metadata to display for a RPi system I'm working on with a VFD display(in a kludgy sort of way). I used @balbuze suggestion for logging the output of librespot and pulling the info out of that. In order to get the full metadata I modified the logging output of player.rs to output the track id in Hex which I could then convert to base62 with a php script which can then use it to look up the metadata from Spotify (my rust programming skills are virtually non-existent so this was the best way for me!).

I really like the idea to just use a file (perhaps called now_playing or something similar). It would only be necessary to put the Spotify trackid (preferably the base62 URI style version) and a timecode for when it started playing in the file, then any system could pick this up and use it to get the metadata from the API and to work out timings. It could also act as a flag to other systems that a Spotify track is currently playing. I think that if it was done as part of the player.rs then it should also be available in anything that uses librespot such as spotifyd.

I'm not really familiar with named pipes, would it be difficult to do both or have an option to choose either at startup?

<!-- gh-comment-id:361260502 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/postacey"><img src="https://avatars0.githubusercontent.com/u/8372935?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [postacey](https://github.com/postacey)** _Monday Mar 06, 2017 at 22:50 GMT_ ---- Hi, First of all, thank you to everyone who's put in so much work on this! I've managed to get the metadata to display for a RPi system I'm working on with a VFD display(in a kludgy sort of way). I used @balbuze suggestion for logging the output of librespot and pulling the info out of that. In order to get the full metadata I modified the logging output of player.rs to output the track id in Hex which I could then convert to base62 with a php script which can then use it to look up the metadata from Spotify (my rust programming skills are virtually non-existent so this was the best way for me!). I really like the idea to just use a file (perhaps called now_playing or something similar). It would only be necessary to put the Spotify trackid (preferably the base62 URI style version) and a timecode for when it started playing in the file, then any system could pick this up and use it to get the metadata from the API and to work out timings. It could also act as a flag to other systems that a Spotify track is currently playing. I think that if it was done as part of the player.rs then it should also be available in anything that uses librespot such as spotifyd. I'm not really familiar with named pipes, would it be difficult to do both or have an option to choose either at startup?
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by tatoosh
Sunday Apr 16, 2017 at 14:51 GMT


Any updates to metadata in a snippet out there?

<!-- gh-comment-id:361260526 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/tatoosh"><img src="https://avatars3.githubusercontent.com/u/3670907?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [tatoosh](https://github.com/tatoosh)** _Sunday Apr 16, 2017 at 14:51 GMT_ ---- Any updates to metadata in a snippet out there?
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by tatoosh
Tuesday May 02, 2017 at 12:39 GMT


I switched console to file for my systemd service:

&>> sp.log
or
|& tee -a sp.log

and can now grab the player Track Title - anyone got a better solution?

INFO:librespot::player: Loading track "I'm the One"
INFO:librespot::player: Track "I'm the One" loaded

<!-- gh-comment-id:361260549 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/tatoosh"><img src="https://avatars3.githubusercontent.com/u/3670907?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [tatoosh](https://github.com/tatoosh)** _Tuesday May 02, 2017 at 12:39 GMT_ ---- I switched console to file for my systemd service: > &>> sp.log or > |& tee -a sp.log and can now grab the player Track Title - anyone got a better solution? INFO:librespot::player: Loading track "I'm the One" INFO:librespot::player: Track "I'm the One" loaded
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by balbuze
Tuesday May 02, 2017 at 15:38 GMT


I made some test and use a bash script that contains

#!/bin/bash
#here we send standard output to a file
./librespot -b 320 -c /tmp --name 'Volumio-pine64' --backend alsa --device plughw:0 >/tmp/infoli 2>&1
#we read the file and extract only track title
cut -d: -f5 /tmp/infoli | cut -d" -f2 | tail -1

<!-- gh-comment-id:361260575 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/balbuze"><img src="https://avatars2.githubusercontent.com/u/12850139?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [balbuze](https://github.com/balbuze)** _Tuesday May 02, 2017 at 15:38 GMT_ ---- I made some test and use a bash script that contains #!/bin/bash #here we send standard output to a file ./librespot -b 320 -c /tmp --name 'Volumio-pine64' --backend alsa --device plughw:0 >/tmp/infoli 2>&1 #we read the file and extract only track title cut -d: -f5 /tmp/infoli | cut -d\" -f2 | tail -1
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by tatoosh
Tuesday May 02, 2017 at 20:33 GMT


Okay thanks for sharing snippet. Hope there will be more metadata in future.

<!-- gh-comment-id:361260597 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/tatoosh"><img src="https://avatars3.githubusercontent.com/u/3670907?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [tatoosh](https://github.com/tatoosh)** _Tuesday May 02, 2017 at 20:33 GMT_ ---- Okay thanks for sharing snippet. Hope there will be more metadata in future.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by seanrand
Tuesday May 02, 2017 at 23:24 GMT


Just FYI, @balbuze & @tatoosh - as you seem to resort to parsing the log output for now. Here's a quick and dirty way of getting the (main) artist onto stderr.

diff --git a/src/player.rs b/src/player.rs
index 70f9779..43a19fd 100644
--- a/src/player.rs
+++ b/src/player.rs
@@ -11,7 +11,7 @@ use vorbis::{self, VorbisError};
 use audio_backend::Sink;
 use audio_decrypt::AudioDecrypt;
 use audio_file::AudioFile;
-use metadata::{FileFormat, Track};
+use metadata::{FileFormat, Track, Artist};
 use session::{Bitrate, Session};
 use mixer::AudioFilter;
 use util::{self, SpotifyId, Subfile};
@@ -341,8 +341,9 @@ impl PlayerInternal {
 
     fn load_track(&self, track_id: SpotifyId, position: i64) -> Option<Decoder> {
         let track = self.session.metadata().get::<Track>(track_id).wait().unwrap();
-
-        info!("Loading track \"{}\"", track.name);
+
+        let artist = self.session.metadata().get::<Artist>(track.artists[0]).wait().unwrap();
+        info!("Loading track \"{}\" by {}", track.name, artist.name);
 
         let track = match self.find_available_alternative(&track) {
             Some(track) => track,
<!-- gh-comment-id:361260622 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/seanrand"><img src="https://avatars2.githubusercontent.com/u/929479?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [seanrand](https://github.com/seanrand)** _Tuesday May 02, 2017 at 23:24 GMT_ ---- Just FYI, @balbuze & @tatoosh - as you seem to resort to parsing the log output for now. Here's a quick and dirty way of getting the (main) artist onto stderr. ``` diff --git a/src/player.rs b/src/player.rs index 70f9779..43a19fd 100644 --- a/src/player.rs +++ b/src/player.rs @@ -11,7 +11,7 @@ use vorbis::{self, VorbisError}; use audio_backend::Sink; use audio_decrypt::AudioDecrypt; use audio_file::AudioFile; -use metadata::{FileFormat, Track}; +use metadata::{FileFormat, Track, Artist}; use session::{Bitrate, Session}; use mixer::AudioFilter; use util::{self, SpotifyId, Subfile}; @@ -341,8 +341,9 @@ impl PlayerInternal { fn load_track(&self, track_id: SpotifyId, position: i64) -> Option<Decoder> { let track = self.session.metadata().get::<Track>(track_id).wait().unwrap(); - - info!("Loading track \"{}\"", track.name); + + let artist = self.session.metadata().get::<Artist>(track.artists[0]).wait().unwrap(); + info!("Loading track \"{}\" by {}", track.name, artist.name); let track = match self.find_available_alternative(&track) { Some(track) => track, ```
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by tatoosh
Wednesday May 03, 2017 at 06:24 GMT


@seanrand thx

<!-- gh-comment-id:361260642 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/tatoosh"><img src="https://avatars3.githubusercontent.com/u/3670907?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [tatoosh](https://github.com/tatoosh)** _Wednesday May 03, 2017 at 06:24 GMT_ ---- @seanrand thx
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by ov3rk1ll
Thursday May 04, 2017 at 12:27 GMT


I've looked into something like this as well and have found a different approach to provide more information in a similar manner.
Instead of writing all the information to a log I'll only write the track id (base62 encoded track.id). This id can be used to call https://api.spotify.com/v1/tracks/ (eg https://api.spotify.com/v1/tracks/3n3Ppam7vgaVa1iaRUc9Lp) to get all the information as well as cover art.

If anybody is intrested in this change, take a look at github.com/ov3rk1ll/librespot@eedaf1c17b.

<!-- gh-comment-id:361260660 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/ov3rk1ll"><img src="https://avatars0.githubusercontent.com/u/1522953?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [ov3rk1ll](https://github.com/ov3rk1ll)** _Thursday May 04, 2017 at 12:27 GMT_ ---- I've looked into something like this as well and have found a different approach to provide more information in a similar manner. Instead of writing all the information to a log I'll only write the track id (base62 encoded track.id). This id can be used to call https://api.spotify.com/v1/tracks/ (eg https://api.spotify.com/v1/tracks/3n3Ppam7vgaVa1iaRUc9Lp) to get all the information as well as cover art. If anybody is intrested in this change, take a look at https://github.com/ov3rk1ll/librespot/commit/eedaf1c17b8718eda2d8c7eef6f569dfa0e343e2.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by kingosticks
Thursday May 04, 2017 at 12:47 GMT


@ov3rk1ll Have you seen the news at https://developer.spotify.com/news-stories/2017/01/27/removing-unauthenticated-calls-to-the-web-api/ that Spotify will soon require most calls to their endpoints to be authenticated? This will include /tracks and will make stuff like this more painful.

<!-- gh-comment-id:361260681 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/kingosticks"><img src="https://avatars2.githubusercontent.com/u/934824?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [kingosticks](https://github.com/kingosticks)** _Thursday May 04, 2017 at 12:47 GMT_ ---- @ov3rk1ll Have you seen the news at https://developer.spotify.com/news-stories/2017/01/27/removing-unauthenticated-calls-to-the-web-api/ that Spotify will soon require most calls to their endpoints to be authenticated? This will include /tracks and will make stuff like this more painful.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by ov3rk1ll
Thursday May 04, 2017 at 12:57 GMT


@kingosticks I've not seen that but it's good to know. Depending on where this ID will be used it might not be too hard to authenticate a user but it'll make using my approach harder.

I don't know enough about the architecture of librespot yet to tell it would be possible to somehow share the existing authentication to pull this information.

<!-- gh-comment-id:361260703 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/ov3rk1ll"><img src="https://avatars0.githubusercontent.com/u/1522953?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [ov3rk1ll](https://github.com/ov3rk1ll)** _Thursday May 04, 2017 at 12:57 GMT_ ---- @kingosticks I've not seen that but it's good to know. Depending on where this ID will be used it might not be too hard to authenticate a user but it'll make using my approach harder. I don't know enough about the architecture of librespot yet to tell it would be possible to somehow share the existing authentication to pull this information.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by ejurgensen
Thursday Sep 07, 2017 at 21:36 GMT


If you are still thinking about this, then an option is to expose the metadata like Shairport does: https://github.com/mikebrady/shairport-sync#metadata

With the metadata exposed you could also let the listener take care of volume adjustments, which might reduce volume change lag and improve quality.

<!-- gh-comment-id:361260718 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/ejurgensen"><img src="https://avatars2.githubusercontent.com/u/1156686?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [ejurgensen](https://github.com/ejurgensen)** _Thursday Sep 07, 2017 at 21:36 GMT_ ---- If you are still thinking about this, then an option is to expose the metadata like Shairport does: https://github.com/mikebrady/shairport-sync#metadata With the metadata exposed you could also let the listener take care of volume adjustments, which might reduce volume change lag and improve quality.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by chimpy
Tuesday Sep 12, 2017 at 23:28 GMT


Hi all,

Chiming in to add my support for metadata for use with forked-daapd, amongst other things.

<!-- gh-comment-id:361260749 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/chimpy"><img src="https://avatars3.githubusercontent.com/u/380577?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [chimpy](https://github.com/chimpy)** _Tuesday Sep 12, 2017 at 23:28 GMT_ ---- Hi all, Chiming in to add my support for metadata for use with `forked-daapd`, amongst other things.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by balbuze
Friday Sep 29, 2017 at 19:46 GMT


@ov3rk1ll I found your solution elegant. Reading the spotify doc https://developer.spotify.com/migration-guide-for-unauthenticated-web-api-calls/ it seems we are in this case : "If your app is hosted (i.e. the code is not exposed to the client) and doesn’t need to perform requests on behalf of a user, then client credentials is a good fit." or maybe I misunderstand. I'm compiling your a version of librespot including your code. I the author of the plugin for volumio and I really want to include metadata un the webUI... https://volumio.org/

<!-- gh-comment-id:361260774 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/balbuze"><img src="https://avatars2.githubusercontent.com/u/12850139?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [balbuze](https://github.com/balbuze)** _Friday Sep 29, 2017 at 19:46 GMT_ ---- @ov3rk1ll I found your solution elegant. Reading the spotify doc https://developer.spotify.com/migration-guide-for-unauthenticated-web-api-calls/ it seems we are in this case : "If your app is hosted (i.e. the code is not exposed to the client) and doesn’t need to perform requests on behalf of a user, then client credentials is a good fit." or maybe I misunderstand. I'm compiling your a version of librespot including your code. I the author of the plugin for volumio and I really want to include metadata un the webUI... https://volumio.org/
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by balbuze
Friday Sep 29, 2017 at 20:09 GMT


Oh I see Oauth is required to get this infos... more complicated...

<!-- gh-comment-id:361260794 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/balbuze"><img src="https://avatars2.githubusercontent.com/u/12850139?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [balbuze](https://github.com/balbuze)** _Friday Sep 29, 2017 at 20:09 GMT_ ---- Oh I see Oauth is required to get this infos... more complicated...
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by michaelherger
Friday Sep 29, 2017 at 20:09 GMT


You can get the necessary token through librespot. No need to ask the user for credentials. Then use that token against the web API. Which now supports basic Connect features, too. E.g. It can tell you what track was currently playing on which device etc.

<!-- gh-comment-id:361260811 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/michaelherger"><img src="https://avatars3.githubusercontent.com/u/2789989?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [michaelherger](https://github.com/michaelherger)** _Friday Sep 29, 2017 at 20:09 GMT_ ---- You can get the necessary token through librespot. No need to ask the user for credentials. Then use that token against the web API. Which now supports basic Connect features, too. E.g. It can tell you what track was currently playing on which device etc.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by michaelherger
Friday Sep 29, 2017 at 20:13 GMT


Oh, I was wrong. It's not part of the librespot executable. But I implemented it in my Spotty helper for the Squeezebox (https://github.com/michaelherger/spotty/blob/master/src/main.rs)

<!-- gh-comment-id:361260836 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/michaelherger"><img src="https://avatars3.githubusercontent.com/u/2789989?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [michaelherger](https://github.com/michaelherger)** _Friday Sep 29, 2017 at 20:13 GMT_ ---- Oh, I was wrong. It's not part of the librespot executable. But I implemented it in my Spotty helper for the Squeezebox (https://github.com/michaelherger/spotty/blob/master/src/main.rs)
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by balbuze
Friday Sep 29, 2017 at 20:16 GMT


Thanks for the answers. But I tested several weeks ago and the token sent for librespot was not usable using spotify webapi. I need to retest U guess

<!-- gh-comment-id:361260868 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/balbuze"><img src="https://avatars2.githubusercontent.com/u/12850139?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [balbuze](https://github.com/balbuze)** _Friday Sep 29, 2017 at 20:16 GMT_ ---- Thanks for the answers. But I tested several weeks ago and the token sent for librespot was not usable using spotify webapi. I need to retest U guess
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by balbuze
Friday Sep 29, 2017 at 20:17 GMT


I see! I'll have a look tomorrow!

<!-- gh-comment-id:361260883 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/balbuze"><img src="https://avatars2.githubusercontent.com/u/12850139?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [balbuze](https://github.com/balbuze)** _Friday Sep 29, 2017 at 20:17 GMT_ ---- I see! I'll have a look tomorrow!
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by awiouy
Friday Sep 29, 2017 at 20:39 GMT


For your information, I already provide artist and title to Kodi through a named pipe, like so:
https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/addons/service/librespot/patches/librespot-02_kodi_hooks.patch
https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/addons/service/librespot/source/default.py#L39..L73
https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/addons/service/librespot/source/bin/librespot.onstart
The named pipe is created before librespot is started.

Of course, the named pipe could be handled in librespot, but my Rust is too poor.

<!-- gh-comment-id:361260922 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/awiouy"><img src="https://avatars0.githubusercontent.com/u/9913019?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [awiouy](https://github.com/awiouy)** _Friday Sep 29, 2017 at 20:39 GMT_ ---- For your information, I already provide artist and title to Kodi through a named pipe, like so: https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/addons/service/librespot/patches/librespot-02_kodi_hooks.patch https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/addons/service/librespot/source/default.py#L39..L73 https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/addons/service/librespot/source/bin/librespot.onstart The named pipe is created before librespot is started. Of course, the named pipe could be handled in librespot, but my Rust is too poor.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by balbuze
Saturday Sep 30, 2017 at 08:56 GMT


@michaelherger thanks for the link. Do you get album art with this ?
@awiouy thanks. Same question about album picture ?

<!-- gh-comment-id:361260945 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/balbuze"><img src="https://avatars2.githubusercontent.com/u/12850139?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [balbuze](https://github.com/balbuze)** _Saturday Sep 30, 2017 at 08:56 GMT_ ---- @michaelherger thanks for the link. Do you get album art with this ? @awiouy thanks. Same question about album picture ?
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by michaelherger
Saturday Sep 30, 2017 at 09:57 GMT


You'd get a URL for the album art IIRC. Or all the information you need to get it. Check the web API.

<!-- gh-comment-id:361260968 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/michaelherger"><img src="https://avatars3.githubusercontent.com/u/2789989?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [michaelherger](https://github.com/michaelherger)** _Saturday Sep 30, 2017 at 09:57 GMT_ ---- You'd get a URL for the album art IIRC. Or all the information you need to get it. Check the web API.
Author
Owner

@snizzleorg commented on GitHub (Jan 29, 2018):

My interest in the meta-data output is mainly the volume. I use librespot to feed the audio to forked-daapd. As it is now this works via a pipe quite nicely. Only problem is that the volume control is delayed because of the time delay introduced due to airplay. With the volume in the metadata this would not be an issue as the metadata could be used to set the volume directly in forked-daapd. shairport-sync does this...

<!-- gh-comment-id:361261894 --> @snizzleorg commented on GitHub (Jan 29, 2018): My interest in the meta-data output is mainly the volume. I use librespot to feed the audio to forked-daapd. As it is now this works via a pipe quite nicely. Only problem is that the volume control is delayed because of the time delay introduced due to airplay. With the volume in the metadata this would not be an issue as the metadata could be used to set the volume directly in forked-daapd. shairport-sync does this...
Author
Owner

@ComlOnline commented on GitHub (Jan 29, 2018):

Hi @snizzleorg, Please use #7 for continued discussion.

<!-- gh-comment-id:361423260 --> @ComlOnline commented on GitHub (Jan 29, 2018): Hi @snizzleorg, Please use #7 for continued discussion.
Author
Owner

@Hydro8 commented on GitHub (Nov 29, 2018):

Hi @balbuze can you explain how to have two instance of librespot on the same rpi ?

<!-- gh-comment-id:442811324 --> @Hydro8 commented on GitHub (Nov 29, 2018): Hi @balbuze can you explain how to have two instance of librespot on the same rpi ?
Author
Owner

@chimpy commented on GitHub (Mar 19, 2019):

Hi @balbuze can you explain how to have two instance of librespot on the same rpi ?

Create two different systemd files and start them up on different accounts.

<!-- gh-comment-id:474384828 --> @chimpy commented on GitHub (Mar 19, 2019): > Hi @balbuze can you explain how to have two instance of librespot on the same rpi ? Create two different systemd files and start them up on different accounts.
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#32
No description provided.