We have multiple playlists with TV shows on them and they seem to repeat a lot of the same episodes.
For example I have a playlist with almost 1100 episodes of newer sitcom episodes in it, 15 days worth according to Plex, and we use it as background TV when we are not actually watching new stuff.
We always hit the randomize button, but it seemingly plays the same 100-150 episodes from the same 7 shows though. Sometimes I will see the same episodes 2-3 times a week which makes me back out of the playlist and then click the random button again to try and get something that has been viewed less often.
It would be nice if the Database kept track of how many times each episode is played and prioritized episodes that are watched less often to help shuffle things up better.
We also have a Playlist with all our comedies and it has almost 4000 episodes (60 days worth) and it does the same thing. Weird thing is, that playlist seems to prefer Roseanne over any other comedies, even though there is almost 20 shows in that playlist. lol
We have a Roku 2 and Roku 3, both do it. Not sure if the Roku app controls this or the Server.
Bumping this to reiterate the issue. I setup PlexPy not long after this post so I can check stats on my server and it has been running since.
Today I grabbed a copy of the SQL Lite db file from PlexPy and exported the history file from it. I then imported it in MS Access and filtered the list to show only the 7 shows in my ‘TV - New Sitcoms’ playlist. The playlist contains 1,130 episodes.
There has been 11,289 episodes played from that playlist, of which 1,119 individual episodes have been played at least once.
525 episodes have been played between 1-10 times
594 episodes have been played between 11-22 times
So some files get played over and over again, while other rarely get played.
I think if they added a field in the Playlist database to track play counts then use that to prioritize episodes with lower play counts it could more evenly rotate through the playlist so it doesn’t repeat as much. Could make it a setting within the playlist so some playlists could play evenly and others won’t. That way everyone gets the choice.
I haven’t used Plex for music yet, although I plan to move from Google Music to Plex soon, just have to recreate all my playlists again. I’m not surprised it would have the same issues, probably uses the same code to randomize.
The “Shuffle isn’t random” bug is very annoying. We play kids TV shows for our children by putting an entire show on shuffle. There’s definitely about 6 episodes that always make it into the first couple episodes played. If I enable debug logging even in verbose mode, the random sequence generated isn’t captured. Regardless, the reason for the repeated patterns is usually caused by using poor random number generators. I’d bet $100 that’s the case here.
Plex devs, please go back to your code and use a cryptographically derived random number or bytes to use as a seed value. If you use something simplistic like RAND or a cruddy seed value that some programmer though would be clever, that’s exactly how you end up with these repeating patterns. This is a very well known phenomenon in software, especially those experienced with secure coding practices. In .NET, use RNGCryptoServiceProvider. For everything else, go straight to the BCryptGenRandom function in Bcrypt.dll. That’s the underlying function used by RNGCryptoServiceProvider in .NET. In OS X, you can get cryptographically secure pseudorandom numbers by reading bytes from the /dev/random device file.
Bumping again, still an issue. I am sure anyone that uses the playlists can attest to this issue.
I copied my PlexPy database again and copied the table out that keeps track of all the plays. I then filtered it to only show the shows in my TV - Sitcoms playlist and had MS Access group and count them. Go here to see the plays for each episode.
This time the exported list spanned 740 days worth of data from this playlist. The plays for some episodes are upwards of 40 plays while others are only once.