Skip to content

Emit shuffle and repeat events again #1469

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

Merged

Conversation

photovoltex
Copy link
Member

This should emit the shuffle and repeat event again, when shuffling or repeating changes.

Fixes #1435

@roderickvd roderickvd requested a review from Copilot March 17, 2025 19:37
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reworks the handling of shuffle and repeat commands to re-emit the respective events.

  • Updated SpircTask command handling for Shuffle, Repeat, and RepeatTrack to call new handler functions.
  • Introduced new handler functions (handle_shuffle and handle_repeat) that emit events before invoking the underlying connect_state logic.
Comments suppressed due to low confidence (1)

connect/src/spirc.rs:1389

  • [nitpick] Consider adding inline documentation for handle_repeat to clarify how the function determines the effective repeat settings when one or both options are None.
fn handle_repeat(&mut self, context: Option<bool>, track: Option<bool>) -> Result<(), Error> {

@photovoltex photovoltex requested a review from roderickvd March 20, 2025 22:12
@photovoltex photovoltex merged commit 837b3e6 into librespot-org:dev Mar 22, 2025
13 checks passed
@photovoltex photovoltex deleted the re-add-missing-player-event branch March 23, 2025 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PlayerEvent::ShuffleChanged and PlayerEvent::RepeatChanged not sent
2 participants