From da52814926ce0f56278a8b062f5cdf0f13627694 Mon Sep 17 00:00:00 2001 From: Andrew Karpow <andy@ndyk.de> Date: Fri, 17 Jan 2014 16:41:54 +0100 Subject: [PATCH] seek not allowed without song in queue --- htdocs/js/mpd.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/js/mpd.js b/htdocs/js/mpd.js index d40c96b..a742e46 100644 --- a/htdocs/js/mpd.js +++ b/htdocs/js/mpd.js @@ -55,7 +55,7 @@ $(document).ready(function(){ }); $('#progressbar').slider(0); $("#progressbar").on('slider.newValue', function(evt,data){ - if(current_song) { + if(current_song && current_song.currentSongId >= 0) { var seekVal = Math.ceil(current_song.totalTime*(data.val/100)); socket.send("MPD_API_SET_SEEK,"+current_song.currentSongId+","+seekVal); } -- 2.20.1