play: Add -R/--randomize option to play plugin#6424
Open
amiv1 wants to merge 1 commit intobeetbox:masterfrom
Open
play: Add -R/--randomize option to play plugin#6424amiv1 wants to merge 1 commit intobeetbox:masterfrom
play plugin#6424amiv1 wants to merge 1 commit intobeetbox:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6424 +/- ##
=======================================
Coverage 69.52% 69.52%
=======================================
Files 141 141
Lines 18475 18479 +4
Branches 3020 3021 +1
=======================================
+ Hits 12844 12848 +4
Misses 4997 4997
Partials 634 634
🚀 New features to boost your workflow:
|
8489835 to
73f1b37
Compare
play pluginplay plugin
snejus
reviewed
Mar 10, 2026
fd06e8c to
50fdbb8
Compare
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.
Description
I really wanted to combine
randomwithplayto shuffle tracks in a temporary playlist, but couldn't find easy way to do it. I'd like to introduce a new flag-R / --randomizeto theplayplugin to shuffle tracks before passing them to the player.I couldn't really decide between
-rand-R, not sure if there's any rule there. If you believe lower case would be better, just let me know.Regarding tests: they're mocking the
random.shufflefunction and asserting if it's been called or not. Because of the random nature of the feature, it's challenging to create a proper test that will assert the order because there's always a chance that the randomized order will be exactly the same as the input, which may lead to flaky tests.To Do
docs/to describe it.)docs/changelog.rstto the bottom of one of the lists near the top of the document.)