File tree Expand file tree Collapse file tree
core/src/main/java/xyz/gianlu/librespot/player Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public class Player implements FrameListener, TrackHandler.Listener {
2323 private final CacheManager cacheManager ;
2424 private TrackHandler trackHandler ;
2525 private TrackHandler preloadTrackHandler ;
26- private long shuffleSeed ;
26+ private long shuffleSeed = 0 ;
2727
2828 public Player (@ NotNull PlayerConfiguration conf , @ NotNull CacheManager .CacheConfiguration cacheConfiguration , @ NotNull Session session ) {
2929 this .conf = conf ;
@@ -235,6 +235,7 @@ private void updatedTracks(@NotNull Spirc.Frame frame) {
235235 state .setContextUri (frame .getState ().getContextUri ());
236236 state .setRepeat (frame .getState ().getRepeat ());
237237 state .setShuffle (frame .getState ().getShuffle ());
238+ if (state .getShuffle ()) shuffleTracks ();
238239 }
239240
240241 @ Override
You can’t perform that action at this time.
0 commit comments