[PR #408] [MERGED] Transfer playback when changing device #808

Closed
opened 2026-02-28 14:53:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Rigellute/spotify-tui/pull/408
Author: @TimotheeGerber
Created: 4/17/2020
Status: Merged
Merged: 10/21/2020
Merged by: @Rigellute

Base: masterHead: transfer_playback


📝 Commits (1)

  • d73547e Transfer playback when changing device

📊 Changes

3 files changed (+16 additions, -6 deletions)

View changed files

📝 README.md (+1 -1)
📝 src/handlers/select_device.rs (+1 -1)
📝 src/network.rs (+14 -4)

📄 Description

Warning: This PR will not work before PR #90 in rspotify has been merged and a new version has been released. If you want to test it, you can clone my patched version of rspotify and ask cargo to use it instead of the one in crates.io by adding the following in your Cargo.toml:

[patch.crates-io]
rspotify = { path = "../relative/path/to/patched_rspotify" }

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 and receiver_2, and I am currently playing a song on receiver_1. If I select receiver_2, receiver_1 continues to play the song. Nevertheless, commands (pause, next, previous, etc) are sent to receiver_2. So, a pause command will not pause the song because receiver_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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Rigellute/spotify-tui/pull/408 **Author:** [@TimotheeGerber](https://github.com/TimotheeGerber) **Created:** 4/17/2020 **Status:** ✅ Merged **Merged:** 10/21/2020 **Merged by:** [@Rigellute](https://github.com/Rigellute) **Base:** `master` ← **Head:** `transfer_playback` --- ### 📝 Commits (1) - [`d73547e`](https://github.com/Rigellute/spotify-tui/commit/d73547e8448d8105fe4850953436f17b5e65a7da) Transfer playback when changing device ### 📊 Changes **3 files changed** (+16 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) 📝 `src/handlers/select_device.rs` (+1 -1) 📝 `src/network.rs` (+14 -4) </details> ### 📄 Description > Warning: This PR will not work before [PR #90 in `rspotify`](https://github.com/ramsayleung/rspotify/pull/90) has been merged and a new version has been released. If you want to test it, you can clone my patched version of `rspotify` and ask `cargo` to use it instead of the one in `crates.io` by adding the following in your `Cargo.toml`: > > ```toml > [patch.crates-io] > rspotify = { path = "../relative/path/to/patched_rspotify" } > ``` 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` and `receiver_2`, and I am currently playing a song on `receiver_1`. If I select `receiver_2`, `receiver_1` continues to play the song. Nevertheless, commands (pause, next, previous, etc) are sent to `receiver_2`. So, a pause command will not pause the song because `receiver_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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:53:26 +03:00
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/spotify-tui#808
No description provided.