Fix track skipping not clearing the current track.

master
Nekojimi 9 months ago
parent 95d2e41a03
commit 11c8991943
  1. 3
      src/main/java/moe/nekojimi/chords/MusicHandler.java

@ -95,7 +95,7 @@ public class MusicHandler implements AudioSendHandler, Closeable, Consumer<Track
{ {
return false; return false;
} }
System.out.println("Playing track " + currentTrack.getLocation().getAbsolutePath()); // System.out.println("Playing track " + currentTrack.getLocation().getAbsolutePath());
arrayErr = false; arrayErr = false;
byteCount = 3840; byteCount = 3840;
TrackPlayer player = new TrackPlayer(currentTrack); TrackPlayer player = new TrackPlayer(currentTrack);
@ -251,6 +251,7 @@ public class MusicHandler implements AudioSendHandler, Closeable, Consumer<Track
if (!isPlaying()) if (!isPlaying())
return false; return false;
playingTracks.clear(); playingTracks.clear();
currentTrack = null;
requestTrack(); requestTrack();
return true; return true;
} }

Loading…
Cancel
Save