-
Notifications
You must be signed in to change notification settings - Fork 653
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
[Feature Request] local API for play/pause/skip, etc... #457
Comments
spotifyd is a "related project" in Rust using librespot, there is a similar feature request. I have the same challenge, would like to use Spotify Connect and still control music. Lets see if one of the projects implements this feature 😃 |
I implemented a simple socket over at |
Good pointers, thanks! I'll keep searching... too bad I don't speak Rust... And even if I did it would include setting up a complete cross-compile tool chain for RPI... |
FWIW, you could grab a pre-compiled release from https://github.com/ashthespy/Vollibrespot/releases/ The |
OK, it does start, indeed. Great, many thanks! However, now I see two further problems :
I imagine that the simple feedback mechanism of librespot was superseded by the socket mechanism of vollibrespot, so point 1 may be solvable somehow in the end. But for that I need more info about point 2. Any hints? Thanks in advance! |
@m-a-x-i-m-z It's not meant to be a drop-in replacement for librespot. I was under the impression you wanted to roll your own interface, it should be quiet simple though - ashthespy/Volumio-SpotifyConnect should give you a simple nodejs based implementation. But this is all a stopgap, and a long term solution would be to have different metadata providers (websocket/REST/socket) etc similar to how we currently have our backends baked into |
@ashthespy I'm trying to pull the "now playing" JSON data from spotify so I can use it for this project: I've successfully managed to start up vollibrespot; I'd like to connect to it and start pulling the JSON, but I'm not sure where to begin. Thanks! |
@txoof nice project, I have been meaning to do something similar with some nfc cards as well. If you hop onto gitter, I can help you without spamming everyone here ;-) |
if librespot receives a scope and generates the token, the rest can be done by another application |
@HBeserra it does that already - check out |
@ashthespy As I understand it, the get_token () function will generate a token based on a section, scope and client_id, but I would like to receive the most recent token from the connected user. |
|
My goal is to define a scope and export the valid I didn't find any reference to the function in code besides the keymaster, our a documentation about. Is there any documentation or other repository? |
I'm using librespot embedded in moodeaudio suite as a headless player based on raspberry-pi zero. In general it's great, but what I'm missing is a possibility to stop/start playback and also skip to the next song in the list (to be activated by the remote control, which is wired and is waiting to be supported by the software).
librespot-java has a local socket-based API, which can be conveniently used from a command line or potentially from a local IR daemon in my case. However, I'm not convinced that running a java thing on the pi-zero hardware is a good idea...
So IDEALLY I would love to know, whether there is a similar API in librespot or whether it can be easily hacked in.
ALTERNATIVELY: I am aware of the official WEB API, however, I'm missing a way of acquiring credentials and IDs of the current spotify user. The player is installed in the living room and is used by five people/accounts, so hard-wiring the login/credentials into the IR event scripts is not an option. But even though it feels strange, that for stopping/pausing the playback locally I have to send a request to a remote server, I would do so if I was aware of getting the bits and pieces needed for forming a spotify's WEB-API request.
Any input is greatly appreciated!
--Max
The text was updated successfully, but these errors were encountered: