Skip to content

🎧 Your Personal Streaming Service

Make sure we don't get durations with decimals

Deluan654284293812
diff --git a/ui/src/common/DurationField.js b/ui/src/common/DurationField.js
index 66c8986a2..113737911 100644
--- a/ui/src/common/DurationField.js
+++ b/ui/src/common/DurationField.js
@@ -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(':')
}