Skip to content
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

Allow shuffling context playback from CLI #275

Merged
merged 4 commits into from
Oct 23, 2023

Conversation

rudiejd
Copy link
Contributor

@rudiejd rudiejd commented Oct 22, 2023

Closes #239

I did this by adding an option that would change the playback context to shuffle. The other option that immediately occurred to me was to shuffle all tracks in the playback locally in the same way that StartLikedTracks, but that shifts computation to the client and doesn't achieve the desired result IMO

Copy link
Owner

@aome510 aome510 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I would avoid changing the shuffle state unless the user explicitly requests to do so. In that way, StartPlayback should set the shuffle state to true only when start playback --shuffle is called.

spotify_player/src/client/mod.rs Outdated Show resolved Hide resolved
spotify_player/src/event/window.rs Outdated Show resolved Hide resolved
spotify_player/src/event/window.rs Outdated Show resolved Hide resolved
spotify_player/src/event/window.rs Outdated Show resolved Hide resolved
spotify_player/src/event/mod.rs Outdated Show resolved Hide resolved
spotify_player/src/cli/commands.rs Outdated Show resolved Hide resolved
@rudiejd rudiejd requested a review from aome510 October 22, 2023 22:19
Copy link
Owner

@aome510 aome510 left a comment

Choose a reason for hiding this comment

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

looks good. One nit

spotify_player/src/client/mod.rs Outdated Show resolved Hide resolved
Co-authored-by: Thang Pham <phamducthang1234@gmail.com>
@aome510 aome510 merged commit d021d70 into aome510:master Oct 23, 2023
3 checks passed
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.

"random" option in CLI Commands
2 participants