-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
Transfer playback when changing device #408
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work @TimotheeGerber 👍 Thank you.
Will wait until rspotify has released and then will merge this.
@@ -1144,7 +1144,17 @@ impl<'a> Network<'a> { | |||
} | |||
} | |||
|
|||
async fn set_device_id_in_config(&mut self, device_id: String) { | |||
async fn transfert_playback_to_device(&mut self, device_id: String) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
@@ -421,7 +421,7 @@ This table shows all that is possible with the Spotify API, what is implemented | |||
| device | Yes | Get a User’s Available Devices | Yes | | |||
| 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 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating this
A new version of |
b75dace
to
d73547e
Compare
@TimotheeGerber awesome, thanks |
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_1
andreceiver_2
, and I am currently playing a song onreceiver_1
. If I selectreceiver_2
,receiver_1
continues to play the song. Nevertheless, commands (pause, next, previous, etc) are sent toreceiver_2
. So, a pause command will not pause the song becausereceiver_1
does not get the command.receiver_2
gets 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