From: Andrew Karpow Date: Fri, 17 Jan 2014 15:41:54 +0000 (+0100) Subject: seek not allowed without song in queue X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=da52814926ce0f56278a8b062f5cdf0f13627694;p=ympd.git seek not allowed without song in queue --- 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); }