substract the already elspased time of the playing song
All checks were successful
PR Check / lint-and-format (pull_request) Successful in 22s

This commit is contained in:
Mylloon 2024-11-02 17:35:47 +01:00
parent ae6e6960e0
commit ea52a0e597
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -193,8 +193,7 @@ export default {
.slice(0, pos)
.reduce((total, t) => {
if (total === 0) {
// TODO: First track, already playing, we have to substract the already elapsed time
return t.durationMS;
return queue.dispatcher ? t.durationMS - queue.dispatcher.streamTime : t.durationMS;
}
return total + t.durationMS;
}, 0),