[RFE] Spotify Connect support
Jakuje opened this issue · 12 comments
I am using spotify connect a lot to play music on different devices around the home (running mostly raspotify) and controlling them from other devices (phones, laptop) so it came as a disappointment that this client does not support the connect protocol, does not show up in the devices selection and can not allow me to control music playing on other device. I think this support is already in librespot so it should not be that complicated to add (but I did not investigate in detail).
Hi! Thanks for your interest in the project.
librespot does support connect for authentication, not so sure about playback control -- looks like it would involve some work on my end! I'll dig eventually into it, but it is not a top priority for me atm to be honest :)
Thank you for your work! Spot works great for me so far. Looks like this rfe caught some attention so it looks like a common use case.
The librespot links spotcontrol, which should do exactly this (but in go ...) so it should be technically possible. If my list of things that I would like to work on would be a bit shorter, I would offer to have a look into that but this still hangs under the "learn rust". But maybe somebody else will be able to jump on that :)
the rspotify crate provides APIs for this; it's what's used by spotify-tui. I'm going to look into implementing this because I would really like this feature.
Hi! Thank you for taking a look at this :)
Here a few pointers/an overview of the implementation which I had in mind:
- the UI should be updated to allow selecting between devices, don't hesitate to sketch it first so we can agree on a design for this :) ;
- the list of devices can be fetched once the
AppEvent::LoginEvent(LoginEvent::LoginCompleted(_))
event fires; - the app state should be updated to know about which device is selected; either a
Device::Local
or aDevice::Remote(some_id)
; - depending on that value, the
PlayerNotifier
either controls librespot as it currently does, or it controls another device over HTTP.
As for the HTTP calls, I would recommend not using rspotify since we already have a HTTP client, which just needs to implement the extra endpoints.
I have limited time to contribute, but I always have the time for quick messages like this one, don't hesitate if you have questions! As you can see, there are multiple tasks that we could even share if needed!
As for the HTTP calls, I would recommend not using rspotify since we already have a HTTP client, which just needs to implement the extra endpoints.
Ah okay, I will look into this.
Update on this, I have a very hacky prototype working 🥳
That was fast :) thanks! I don't think I'll have time to review this this weekend, or maybe just general remarks
Hey is there any update on this?
hi! I was away a long while, but I had a branch for spotify connect that was WIP : #427
I could have a look again, but I remember it being fairly painful to implement
Would also love to see this feature!
Would love to see this as well. I use car thing to have separate controls for what I'm playing. But it relies on spotify connect to work. If Spot had it, I could ditch the official app again!
But I also understand if it is too much of a nightmare to implement.
It would be nice to have this feature! The absence of a connect-to-device feature - only stops me from using Spot, instead of the official client.