tracklist: reshuffle tracklist when exhausted
commite87a0231846ca1ef79eff07233025989693131d2
authorEric Wong <e@80x24.org>
Tue, 5 Jan 2016 09:32:09 +0000 (5 09:32 +0000)
committerEric Wong <e@80x24.org>
Tue, 5 Jan 2016 09:49:43 +0000 (5 09:49 +0000)
tree42161a9d46de89e3deb691afa5a6512ad20f0cb8
parentd5044386bf829125f948b6a706d9c590a60e9791
tracklist: reshuffle tracklist when exhausted

For now, shuffle means "random without repeats".  So avoid repeating
ourselves by shuffling when we've reached the end of the shuffled
tracklist and have no more tracks to go.  Whenever a client restarts
the player or hits the loop for repeat, we'll have a freshly
shuffled list for them to listen to.
lib/dtas/tracklist.rb