Skip to content

Commit

Permalink
fix seek command times are not rounded correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicTeaMC committed Aug 27, 2023
1 parent 0a9c6ff commit b91ecda
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ public void doCommand(CommandEvent event) {
return;
}

minutes += seconds / 60;
seconds = seconds % 60;

hours += minutes / 60;
minutes = minutes % 60;

seek_milliseconds += hours * 3600000 + minutes * 60000 + seconds * 1000;
if (seek_milliseconds <= track_duration) {
handler.getPlayer().getPlayingTrack().setPosition(seek_milliseconds);
Expand Down

0 comments on commit b91ecda

Please sign in to comment.