Round song duration (instead of truncating it). Relates to #1926

This commit is contained in:
Deluan
2022-10-10 21:28:58 -04:00
parent 62e7492357
commit af5c2b5a42
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ export const formatDuration = (d) => {
const days = Math.floor(d / 86400)
const hours = Math.floor(d / 3600) % 24
const minutes = Math.floor(d / 60) % 60
const seconds = Math.floor(d % 60)
const seconds = Math.round(d % 60)
const f = [hours, minutes, seconds]
.map((v) => v.toString())
.map((v) => (v.length !== 2 ? '0' + v : v))