Skip to content

Commit 0d69043

Browse files
Repulserfreyacodes
authored andcommitted
Fix position and use isSeekable (#48)
1 parent 8fa6dd5 commit 0d69043

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

LavalinkClient/src/main/java/lavalink/client/player/LavalinkPlayer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ public boolean isPaused() {
130130
@Override
131131
public long getTrackPosition() {
132132
if (getPlayingTrack() == null) throw new IllegalStateException("Not currently playing anything");
133-
if (getPlayingTrack().getInfo().isStream) return Long.MAX_VALUE;
134133

135134
if (!paused) {
136135
// Account for the time since our last update
@@ -145,7 +144,7 @@ public long getTrackPosition() {
145144
@Override
146145
public void seekTo(long position) {
147146
if (getPlayingTrack() == null) throw new IllegalStateException("Not currently playing anything");
148-
if (getPlayingTrack().getInfo().isStream) throw new IllegalStateException("Can't seek in a stream");
147+
if (!getPlayingTrack().isSeekable()) throw new IllegalStateException("Track cannot be seeked");
149148

150149
JSONObject json = new JSONObject();
151150
json.put("op", "seek");

0 commit comments

Comments
 (0)