1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-30 16:17:41 +01:00

Merge pull request #126 from JipFr/v3

fix(player): use paddedMins for videos less than an hour
This commit is contained in:
mrjvs 2023-01-24 01:35:02 +01:00 committed by GitHub
commit 6d9a963592
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,7 +22,7 @@ function formatSeconds(secs: number, showHours = false): string {
const paddedSecs = seconds.toString().padStart(2, "0"); const paddedSecs = seconds.toString().padStart(2, "0");
const paddedMins = minutes.toString().padStart(2, "0"); const paddedMins = minutes.toString().padStart(2, "0");
if (!showHours) return [minutes, paddedSecs].join(":"); if (!showHours) return [paddedMins, paddedSecs].join(":");
return [hours, paddedMins, paddedSecs].join(":"); return [hours, paddedMins, paddedSecs].join(":");
} }