mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-23 23:20:57 +03:00
Make sure we don't get durations with decimals
This commit is contained in:
parent
8d7931b3bc
commit
6542842938
@ -15,7 +15,8 @@ const format = (d) => {
|
||||
const minutes = Math.floor(d / 60) % 60
|
||||
const seconds = d % 60
|
||||
return [hours, minutes, seconds]
|
||||
.map((v) => (v < 10 ? '0' + v : v))
|
||||
.map((v) => Math.round(v).toString())
|
||||
.map((v) => (v.length !== 2 ? '0' + v : v))
|
||||
.filter((v, i) => v !== '00' || i > 0)
|
||||
.join(':')
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user