Skip to content

Weight albums by remaining tracks when shuffling

Cameron Tauxe requested to merge camtauxe/lollypop:shuffle_fixes into master

Made to address issue #2049 (closed). Previously, the shuffling algorithm picked a random album first, then picked a song within that album. This resulted in songs in albums with few songs in them being played disproportionately often. These commits alter the behavior so that, while an album is still picked first, the algorithm for picking an album is weighted according to the number of not-yet played songs in that album.

Testing on my own collection (2700 tracks in 226 albums), the additional complexity didn't result in any noticeable performance issues.

Merge request reports