Skip to content

Commit

Permalink
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -130,7 +130,6 @@ public boolean isPaused() {
@Override
public long getTrackPosition() {
if (getPlayingTrack() == null) throw new IllegalStateException("Not currently playing anything");
if (getPlayingTrack().getInfo().isStream) return Long.MAX_VALUE;

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

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

0 comments on commit 0d69043

Please sign in to comment.