Skip to content

Commit

Permalink
fix not being able to seek when player is paused
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Jan 3, 2024
1 parent a72496a commit 440a4fb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ class PlayerRestHandler(
// we handle position differently for playing new tracks
playerUpdate.position.takeIf { it.isPresent && !playerUpdate.encodedTrack.isPresent && !playerUpdate.identifier.isPresent }
?.let {
if (player.isPlaying) {
player.seekTo(it.value)
if (player.track != null) {
player.seekTo(it)
SocketServer.sendPlayerUpdate(context, player)
}
}
Expand Down

0 comments on commit 440a4fb

Please sign in to comment.