feat: Initiate transfer playback via spclient api#1530
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements functionality to transfer Spotify playback control to the current device using the spclient transfer API. It adds methods to initiate playback transfers and ensures commands are only executed after connection establishment.
- Adds a
transfermethod toSpClientthat calls the Connect transfer endpoint - Adds a
transfermethod toSpircfor convenient playback transfer to the current device - Prevents
spirccommands from executing before connection is established
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| core/src/spclient.rs | Implements transfer method to call spclient transfer API endpoint |
| core/src/dealer/protocol/request.rs | Updates TransferOptions to use Option<String> fields and adds serialization support |
| connect/src/spirc.rs | Adds connection state tracking, Transfer command, and prevents command execution before connection |
| CHANGELOG.md | Documents the new transfer method addition |
35ab803 to
858f6cd
Compare
Member
|
You want to include this into the any-day-to-be-released-now v0.7.0 or wait until after? |
Member
Author
|
Let's wait with merging this. I think it's a nice addition but not necessary to get the release out. And btw. thanks for the opinionated work the last days. That made some decisions that were standing out for a while finally resolved :D |
# Conflicts: # connect/src/spirc.rs
roderickvd
reviewed
Oct 6, 2025
This was referenced Nov 10, 2025
CreatorMetaSky
pushed a commit
to StreamMediaSpace/librespot-zig
that referenced
this pull request
Feb 9, 2026
* feat: provide an easy transfer option to the spirc * fix: execute spirc commands after connection establishment
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.
transferendpoint ofspclientspircto easily transfer the playback to ourselvesspircto be executed before connection establishmentDuring checkups at the end I also encountered a warning for
big-num, which might be a problem sometimes in the future.For context I did run `cargo report future-incompatibilities --id 1` after cargo suggested it:
The following warnings were discovered during the build. These warnings are an indication that the packages contain code that will become an error in a future release of Rust. These warnings typically cover changes to close soundness problems, unintended or undocumented behavior, or critical problems that cannot be fixed in a backwards-compatible fashion, and are not expected to be in wide use.Each warning should contain a link for more information on what the warning
means and how to resolve it.
To solve this problem, you can try the following approaches:
If the issue is not solved by updating the dependencies, a fix has to be
implemented by those dependencies. You can help with that by notifying the
maintainers of this problem (e.g. by creating a bug report) or by proposing a
fix to the maintainers (e.g. by creating a pull request):
cargo report future-incompatibilities --id 1 --package num-bigint-dig@0.8.4If waiting for an upstream fix is not an option, you can use the
[patch]section in
Cargo.tomlto use your own version of the dependency. For moreinformation, see:
https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section
The package
num-bigint-dig v0.8.4currently triggers the following future incompatibility lints:Resolves #1519