chore: merge branch dev
to main
#200
1 changed files with 12 additions and 1 deletions
|
@ -187,7 +187,18 @@ export default {
|
|||
return loc.get("c_play_sub2_name");
|
||||
}
|
||||
|
||||
const estimation = timeToString(queue.estimatedDuration);
|
||||
const estimation = timeToString(
|
||||
[queue.currentTrack, ...queue.tracks.toArray()]
|
||||
.filter((t) => t !== null)
|
||||
.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 total + t.durationMS;
|
||||
}, 0),
|
||||
);
|
||||
return `${loc.get("c_play10")} ${pos} (${loc.get("c_play11")} ≈${estimation})`;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue