[GH-ISSUE #103] give up playback | disconnect #31

Closed
opened 2026-02-27 20:22:42 +03:00 by kerem · 4 comments
Owner

Originally created by @jgabriel98 on GitHub (Jul 24, 2020).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/103

I know that it is possible to give the playback to another device.

But it would be nice if was possible to work in a slightly different way: give up on playback control (or just disconnect).

why is this different from giving playback to any other device?:

  • when you have only the "rspotify device" (that is, only one) running, you cannot transfer the playback (because there are no other devices to transfer to),
    but it makes sense to throw away the playback control (or just disconnects).

Maybe i am talking nonsense here, or just requesting something that already exists, since i've come from searching this spotifyd repository, and saw that it was missing the Stop() Mpris implementation, because there was no explicit disconnect implementation from rspotify.
So i have near zero experience with the rspotify.

Originally created by @jgabriel98 on GitHub (Jul 24, 2020). Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/103 I know that it is possible to [give the playback to another device](https://github.com/ramsayleung/rspotify/blob/master/examples/transfer_playback.rs). But it would be nice if was possible to work in a slightly different way: give up on playback control (or just disconnect). why is this different from _giving playback to any other device_?: - when you have **only** the "**rspotify device**" (that is, only **one**) running, you cannot transfer the playback (because there are no other devices to transfer to), but it makes sense to throw away the playback control (or just disconnects). Maybe i am talking nonsense here, or just requesting something that already exists, since i've come from searching this [spotifyd](https://github.com/Spotifyd/spotifyd) repository, and saw that it was missing the `Stop()` _**Mpris implementation**_, because there was no explicit disconnect implementation from **rspotify**. So i have near zero experience with the **rspotify**.
kerem 2026-02-27 20:22:42 +03:00
Author
Owner

@ramsayleung commented on GitHub (Jul 26, 2020):

But it would be nice if was possible to work in a slightly different way: give up on playback control (or just disconnect).

Sorry for not getting your point, do you mean swapping playback control between two devices by using rspotify?

Stop() Mpris implementation,

It seems spotify web API does not have such an endpoint.

<!-- gh-comment-id:663988690 --> @ramsayleung commented on GitHub (Jul 26, 2020): > But it would be nice if was possible to work in a slightly different way: give up on playback control (or just disconnect). Sorry for not getting your point, do you mean swapping playback control between two devices by using `rspotify`? > `Stop()` *Mpris implementation*, It seems `spotify` web API does not have such an endpoint.
Author
Owner

@jgabriel98 commented on GitHub (Jul 26, 2020):

Sorry for not getting your point, do you mean swapping playback control between two devices by using rspotify?

I think i was unclear, sorry for that.

do you mean swapping playback control between two devices by using rspotify

No, i meant to disconnect the current (self) rspotify playback device.

an example in more details:

  • When in my smartPhone 1 spotify app, let's say you have a list of available devices to play,
    and one current active, which in this case is a device ran by rspotify, as an zeroconf device (spotiffy connect).
  • Now i want to disconnect from it, because i want to this rspotify device become available for the smartPhone 2 spotify app.

example 2:

  • When in my smartphone spotify app, i am using the rspotify device, as an zeroconf device (spotiffy connect).
  • Now, in the same smartphone i will connected to an airplay or bluetooth device (which i have control, so i know when a new connection starts).
  • Since want my iPhone to play the song in this new connected device (airplay or bluetooth), i need to disconnect from the rspotify device in spotify.
  • But i want to rspotify device to still be available , so i can connect to it later if i wish to do so.

the second example is closer to my real application (the reason to open this issue),
where i have multiple options to play audio (spotify connect, airplay, bluetooth), and when i choose one, i want to the other ones close theirs connections ( if they have one) but then be ready to accept a new one.

<!-- gh-comment-id:664019461 --> @jgabriel98 commented on GitHub (Jul 26, 2020): > Sorry for not getting your point, do you mean swapping playback control between two devices by using rspotify? I think i was unclear, sorry for that. > do you mean swapping playback control between two devices by using rspotify No, i meant to disconnect the current (self) rspotify playback device. an example in more details: - When in my **smartPhone 1** spotify app, let's say you have a list of available devices to play, and one current active, which in this case is a device ran by **rspotify**, as an zeroconf device (spotiffy connect). - Now i want to disconnect from it, because i want to this **rspotify** device become available for the **smartPhone 2** spotify app. example 2: - When in my smartphone spotify app, i am using the **rspotify** device, as an zeroconf device (spotiffy connect). - Now, in the same smartphone i will connected to an airplay or bluetooth device (which i have control, so i know when a new connection starts). - Since want my iPhone to play the song in this new connected device (airplay or bluetooth), i need to disconnect from the **rspotify** device in spotify. - But i want to **rspotify** device to still be available , so i can connect to it later if i wish to do so. the second example is closer to my real application (the reason to open this issue), where i have multiple options to play audio (spotify connect, airplay, bluetooth), and when i choose one, i want to the other ones close theirs connections ( if they have one) but then be ready to accept a new one.
Author
Owner

@kstep commented on GitHub (Nov 25, 2020):

I think, there's some misunderstanding here. rspotify is not a playback device, it's just Web API library to control playback, it doesn't provide any device to play music on, so there's no way to "connect" or "disconnect" rspotify "device".

<!-- gh-comment-id:733397186 --> @kstep commented on GitHub (Nov 25, 2020): I think, there's some misunderstanding here. `rspotify` is not a playback device, it's just Web API library to control playback, it doesn't provide any device to play music on, so there's no way to "connect" or "disconnect" rspotify "device".
Author
Owner

@marioortizmanero commented on GitHub (Feb 25, 2021):

I assume this can be closed now.

<!-- gh-comment-id:786308870 --> @marioortizmanero commented on GitHub (Feb 25, 2021): I assume this can be closed now.
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/rspotify#31
No description provided.