seek not allowed without song in queue

This commit is contained in:
Andrew Karpow 2014-01-17 16:41:54 +01:00
parent fc1d7c1242
commit da52814926
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}