mirror of
https://github.com/SuperBFG7/ympd
synced 2025-01-10 17:30:35 +00:00
seek not allowed without song in queue
This commit is contained in:
parent
fc1d7c1242
commit
da52814926
@ -55,7 +55,7 @@ $(document).ready(function(){
|
|||||||
});
|
});
|
||||||
$('#progressbar').slider(0);
|
$('#progressbar').slider(0);
|
||||||
$("#progressbar").on('slider.newValue', function(evt,data){
|
$("#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));
|
var seekVal = Math.ceil(current_song.totalTime*(data.val/100));
|
||||||
socket.send("MPD_API_SET_SEEK,"+current_song.currentSongId+","+seekVal);
|
socket.send("MPD_API_SET_SEEK,"+current_song.currentSongId+","+seekVal);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user