1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-05-06 09:24:06 +00:00

Fix: seek in progress bar

This commit is contained in:
jcorporation 2018-12-03 22:22:28 +00:00
parent f9c5decfa5
commit e83929bc17

View File

@ -377,7 +377,7 @@ function appInit() {
domCache.progressBar.value = 0; domCache.progressBar.value = 0;
domCache.progressBar.addEventListener('change', function(event) { domCache.progressBar.addEventListener('change', function(event) {
if (currentSong && currentSong.currentSongId >= 0) { if (currentSong && currentSong.currentSongId >= 0) {
var seekVal = Math.ceil(currentSong.totalTime * (domCache.progressBar.value / 100)); var seekVal = Math.ceil(currentSong.totalTime * (domCache.progressBar.value / 1000));
sendAPI({"cmd": "MPD_API_PLAYER_SEEK", "data": {"songid": currentSong.currentSongId, "seek": seekVal}}); sendAPI({"cmd": "MPD_API_PLAYER_SEEK", "data": {"songid": currentSong.currentSongId, "seek": seekVal}});
} }
}, false); }, false);