Skip to content
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

[RFE] Spotify Connect support #55

Open
Jakuje opened this issue Feb 17, 2021 · 12 comments
Open

[RFE] Spotify Connect support #55

Jakuje opened this issue Feb 17, 2021 · 12 comments
Labels
enhancement New feature or request

Comments

@Jakuje
Copy link

Jakuje commented Feb 17, 2021

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).

@xou816 xou816 added the enhancement New feature or request label Feb 17, 2021
@xou816
Copy link
Owner

xou816 commented Feb 17, 2021

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 :)

@Jakuje
Copy link
Author

Jakuje commented Feb 17, 2021

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 :)

@Ella-0
Copy link
Contributor

Ella-0 commented Oct 8, 2021

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.

@xou816
Copy link
Owner

xou816 commented Oct 8, 2021

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 a Device::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!

@Ella-0
Copy link
Contributor

Ella-0 commented Oct 8, 2021

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.

@Ella-0
Copy link
Contributor

Ella-0 commented Oct 8, 2021

Update on this, I have a very hacky prototype working 🥳

@Ella-0 Ella-0 mentioned this issue Oct 8, 2021
3 tasks
@xou816
Copy link
Owner

xou816 commented Oct 8, 2021

That was fast :) thanks! I don't think I'll have time to review this this weekend, or maybe just general remarks

@Savanta
Copy link

Savanta commented Feb 10, 2023

Hey is there any update on this?

@xou816
Copy link
Owner

xou816 commented Feb 18, 2023

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

@johnmmcgee
Copy link

Would also love to see this feature!

@jpsnyder
Copy link

jpsnyder commented Mar 6, 2023

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.

@bigkrp
Copy link

bigkrp commented Jul 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants