Transfer playback when changing device#408
Merged
Merged
Conversation
Rigellute
approved these changes
Apr 21, 2020
Owner
Rigellute
left a comment
There was a problem hiding this comment.
Good work @TimotheeGerber 👍 Thank you.
Will wait until rspotify has released and then will merge this.
| } | ||
|
|
||
| async fn set_device_id_in_config(&mut self, device_id: String) { | ||
| async fn transfert_playback_to_device(&mut self, device_id: String) { |
| | current_playback | Yes | Get Information About The User’s Current Playback | Yes | | ||
| | current_playing | No | Get the User’s Currently Playing Track | No | | ||
| | transfer_playback | No | Transfer a User’s Playback | No | | ||
| | transfer_playback | Yes | Transfer a User’s Playback | Yes | |
Contributor
Author
|
A new version of |
b75dace to
d73547e
Compare
Owner
|
@TimotheeGerber awesome, thanks |
lanej
pushed a commit
to lanej/spotify-tui
that referenced
this pull request
Jul 13, 2021
nighi
pushed a commit
to nighi/spotify-tui
that referenced
this pull request
Jul 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, selecting another device changes the device in the internal representation but does not transfer playback to the selected device. This is counter intuitive and lead to strange situations.
Imagine I have 2 devices,
receiver_1andreceiver_2, and I am currently playing a song onreceiver_1. If I selectreceiver_2,receiver_1continues to play the song. Nevertheless, commands (pause, next, previous, etc) are sent toreceiver_2. So, a pause command will not pause the song becausereceiver_1does not get the command.receiver_2gets the command and cannot do anything with it.This PR changes that behavior and transfer playback when selecting a device.
I hope that the modifications I have made are OK. Don't hesitate to comment them if needed!
Closes #366