2016-11-29, 18:49
So using Kodi 16.1 Smart Playlists that are set to random do not yield the expected random playlist results in many cases. The tracks that go into the playlist are randomly selected based on the rules, but the final ordering of the tracks in the playlist is not random. The ordering of selected tracks is always sorted first by track number, then artist, lastly title.
This behavior isn't very obvious if you make a small sized playlist relative to the number of matches to the input rules. With a 25 song playlist from 1000+ possible input tracks, the resulting playlist seems reasonably random if you're not paying close attention to the track order to catch how they're ordered. However, the larger the number of tracks in the smart playlist gets relative to the number of tracks that meet the matching input rules the less random and more repeatable the playlist becomes. This continues to the point that if you give it unlimited playlist size you will get the exact same playlist every time it "randomly" generates.
It seems like there should either be a 2nd randomization pass after the tracks are randomly selected, or Kodi shouldn't be re-ordering/sorting the randomly selected tracks in the first place.
How to duplicate:
1) Make smart playlist of unlimited size using whatever rules you want choosing Random.
2) Chose the smart playlist and let it generate.
3) Look at order of the playlist. Note that tracks will be sorted by the following criteria in order: track number, artist, title.
4) Make a note of the track order (screenshot, snap a picture, write it down, etc.).
5) Go back to the main menu, backing out of the playlist results
6) Go to step 2) Feel free to restart Kodi, reboot the box in between, etc.
You'll see the track order of the playlist is the same every single time it generates and is very much not random.
This behavior happens on both the RPi 3 and my Chromebox (Haswell) using a clean install of Kodi (LE 7.0.2) with no add-ons or modifications from the default settings, skins, etc.
This behavior isn't very obvious if you make a small sized playlist relative to the number of matches to the input rules. With a 25 song playlist from 1000+ possible input tracks, the resulting playlist seems reasonably random if you're not paying close attention to the track order to catch how they're ordered. However, the larger the number of tracks in the smart playlist gets relative to the number of tracks that meet the matching input rules the less random and more repeatable the playlist becomes. This continues to the point that if you give it unlimited playlist size you will get the exact same playlist every time it "randomly" generates.
It seems like there should either be a 2nd randomization pass after the tracks are randomly selected, or Kodi shouldn't be re-ordering/sorting the randomly selected tracks in the first place.
How to duplicate:
1) Make smart playlist of unlimited size using whatever rules you want choosing Random.
2) Chose the smart playlist and let it generate.
3) Look at order of the playlist. Note that tracks will be sorted by the following criteria in order: track number, artist, title.
4) Make a note of the track order (screenshot, snap a picture, write it down, etc.).
5) Go back to the main menu, backing out of the playlist results
6) Go to step 2) Feel free to restart Kodi, reboot the box in between, etc.
You'll see the track order of the playlist is the same every single time it generates and is very much not random.
This behavior happens on both the RPi 3 and my Chromebox (Haswell) using a clean install of Kodi (LE 7.0.2) with no add-ons or modifications from the default settings, skins, etc.