Skip to content

feat: implemented random button in the playlist view - #2273

Open
Keviddle wants to merge 1 commit into
jeffvli:developmentfrom
Keviddle:feature/2270-RandomizeAlbumsInPlaylist
Open

feat: implemented random button in the playlist view#2273
Keviddle wants to merge 1 commit into
jeffvli:developmentfrom
Keviddle:feature/2270-RandomizeAlbumsInPlaylist

Conversation

@Keviddle

@Keviddle Keviddle commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

This is an implementation that fixes #2270.
Having a random function in many places in the app already, only lead me to the conclusion that it makes sense to implement it in the playlist view as well.
Therefore my changes include

  • Random sort order in playlist view for tracks and albums
  • Addition of some logic to allow refresh to re-randomize the list

Closes #2270

@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
feishin Ready Ready Preview, Comment Jul 22, 2026 5:55pm

@stevenre3d

Copy link
Copy Markdown

thanks @Keviddle :)

return sortSongList(filtered, sortBy, sortOrder);
}, [data?.items, query, searchTerm]);
// eslint-disable-next-line react-hooks/exhaustive-deps -- refreshRevision intentionally triggers a new random order
}, [data?.items, query, searchTerm, refreshRevision]);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You should only refresh the filter if the sort by is random and the sortBy is random.

}

return sortSongList(searched, sortBy, sortOrder);
// eslint-disable-next-line react-hooks/exhaustive-deps -- refreshRevision intentionally triggers a new random order

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Likewise here, this only needs to be refreshed when refresh version changes and the sort order is random.

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.

[Feature]: Shuffle/Randomize Albums in Playlist

3 participants