Repository navigation
fix: IoEvent::Repeat from a plugin changes Spotify's repeat while internet ra... - #390
Merged
Merged
Conversation
Contributor
📝 WalkthroughWalkthroughRadio dispatch now consumes ChangesRadio Repeat Event Handling
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
LargeModGames
added a commit
that referenced
this pull request
Sep 2, 2026
…ck (#503) # Summary Closes the second half of #376. After #390 closed the internet-radio path, a plugin's `set_repeat` still reached the user's real Spotify device whenever the native queue slot owned playback: `Action::SetRepeat` dispatches a raw `IoEvent::Repeat`, no router consumed it, and `Network::repeat` changed repeat on a track the user was not listening to, with nothing on screen to show for it. This is reachable in a plain `default` build. The fix is a `Repeat` arm in `route_queue_event`, gated on `queue_owns_playback()`. That router is compiled unconditionally and runs first in the pump, so it covers the Spotify and decoded queue slots in one place without touching the per-source dispatchers. It sets the same "Repeat does not apply to this source" status the keyboard path uses, so the plugin caller gets the same answer as the key. `set_shuffle` does not have the same hole: `Action::SetShuffle` goes through `App::shuffle`, which already carries the queue-slot guard. # Testing - `cargo fmt --all -- --check` - `cargo clippy --no-default-features --features telemetry,tui -- -D warnings`: clean - `cargo test --no-default-features --features telemetry,tui`: 906 passed - `cargo clippy -- -D warnings`: clean - `cargo test`: 1208 passed, including the new `repeat_is_refused_while_the_queue_slot_owns_playback` (gated on `streaming`, since the slim build's `QueueNowPlaying` has no variants) - `tools/check_gates_ratchet.sh origin/main`: ok Not verified: a live run with a Lua plugin calling `set_repeat` over a queued track. # Additional notes `test_attribute_total` moves 1770 to 1771 in `tools/gates.count` for the new test. --- <sub>💬 Questions or want to chat with other contributors? Join the [spotatui Discord](https://spotatui.com/discord).</sub> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Queue playback now handles repeat actions directly while playback is active and displays a status message. * Repeat actions continue to be forwarded normally when the queue does not control playback. * **Tests** * Added coverage for repeat handling in both playback scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.
Refs #376. Partial fix: this covers the internet-radio path only, so #376 stays open. See the follow-up comment on the issue for what is left.
Summary
IoEvent::Repeat from a plugin changes Spotify's repeat while internet radio plays
Validation
🤖 AI-authored PR, operated by @yhay81.
Summary by CodeRabbit