Join GitHub today
Random album playback plugin - make it Python 3 compatible #2922
When using the
album_scores = sorted(self._score(chosen_albums))
The exception was cause by Python 3 not being able to sort class instances without a
The original code sorted the albums and picked the maximum. I changed the code to find the maximum score, filter the albums by this maximum score and pick an album by random from the resulting list. This also solved the problem, that the original
Thanks for the PR! Looks good to me.
The only thing would be the debug print. If you can fix that it'll be good to go.