MetroList: Fix Next Song When Random Selection Matches Current

Scritto da Alessio il 12/03/2026

Problem

When picking a random song, if the random selection matched the currently playing song, playback would either stop or behave unexpectedly. The random selection logic didn't account for the current song being a valid random choice.

Solution

Added logic to ensure the random song is different from the current song. If random selection matches current, the algorithm picks again until a different song is selected or all options are exhausted.

Result

Random song selection always produces a different song from what's currently playing, even when queue has limited songs.

Commit: MetrolistGroup/Metrolist@fbd1fa1
PR: #3140