-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metadata pipe - is it possible? #1431
Comments
You probably want https://github.com/librespot-org/librespot/wiki/Events it's the closest thing we have to what you're after. |
Thank you for pointing me to Events. The data seems to be there, this would require however to build an own pipe and store the data in some form of format that can be interrupted by owntone (which I lack documentation for). is there no integrated solution that already saves the metadata in the right format in a pipe, in the same way like the audio output is stored there. I can’t be the only one with this need. |
What's the format you require? Some specific metadata format your other software understands? This project doesn't provide things like that, but all the tools are there for you to create what you need for your use case. Perhaps open this up as a discussion topic rather than an issue. Maybe someone has done something similar before. |
I was not aware that my question is so unclear. I referred to owntone as the app consuming the pipe metadata. With some research I was able to deduct the following format for the metadata pipe:
this is then shown as Interpret, Song and Album. I can pipe it already into owntone via cat metadata.txt > spotify.metadata Together with your hint about events, I think I can use this Python event handler ( https://github.com/librespot-org/librespot/blob/dev/contrib/event_handler_example.py ) script to write into a txt file and then pipe it to owntone. I just can't believe this hacky solution is the only one and librespot doesn't have a really elegant one. |
Great, glad you found a solution to your problem. Perhaps suggest the owntone developers integrate it into their offering. Something so specific to a downstream project is never going to be provided here, it makes no sense. If there's some generic functionality/improvement that librespot can provide that makes this sort of thing easier, please feel free to make suggestions. The idea is we provide simple and flexible mechanisms that can be customised to serve everyone's needs, not just particular programs like owntone. Hope that is clearer. |
I think there is a misunderstanding. I am not asking for anything that is particular for only owntone. I was asking for a pipe of the metadata, in the very exact same way the audio can be piped. This is after all a central functionality at the core of librespot, isn't it? So piping metadata of the song / album / artist via a flag via librespot is all I was asking for. If and how this data is then interpreted and reformatted, is a complete different topic and indeed specific to a downstream project. But again, the main question was how to have not only an audio pipe via mkfifo but also metadata pipe via mkfifo. Hope this was more understandable :) |
Ok, this is just another #7 then |
I think this thread sums it up well. There is talk of a --metadata-pipe /opt/music/spotify.metadata which however gives me command line parsing errors. Also there is this metadata folder as part of this repo: https://github.com/librespot-org/librespot/tree/dev/metadata That's why my question was, is there an integrated command line functionality or not? I was unsure and wanted to confirm. |
#214 wasn't merged as it seems to be declared out of scope of the library project with the argument to implement it in https://github.com/librespot-org/librespotd. So currently the binary doesn't provide the feature you are looking for. The library however does provide the functionality, as @kingosticks already pointed out. You could take a look at https://github.com/Spotifyd/spotifyd. Maybe they did implement something similar to what you are looking for. |
Thank you for the clarification @photovoltex and @kingosticks |
Hey @FrancisHGR, did you find another solution in the end, or did you settle with your pervious? |
I investigated the format that is needed for the metadata in a txt file, example above. You can then create a fifo with "mkfifo spotify.metadata" and pipe the metadata with "cat ./metadata.txt > spotify.metadata" . Beyond that I didn't continue, in principle I have an idea how to do it but I have other more pressing things to do for now. In case another librespot version is available that includes a metadata pipe, I'd be interested though. |
librespot-java has had the code to output metadata to a pipe that is consumable for OwnTone so that may be a good reference. Since librespot-java is not actively maintained beyond the occasional bug fix, it would be nice to see this feature added to librespot. |
Description
I would like to pipe the metadata of the spotify content (artist + song title) in the same way I pipe the audio. I am not sure whether this feature is included and I am to stupid to find it or whether its not included. I found some hints in the cargo.toml but I am not expert on this.
Version
I am using the latest version, 0.6.0. Everything else is working besides that. I pipe the music to owntone.
Host (what you are running
librespot
on):Debian / Ubuntu in a docker container and also standalone
Thank you so much for any help!
The text was updated successfully, but these errors were encountered: