continue fixing
This commit is contained in:
@@ -258,11 +258,13 @@ async function deleteVideo(video) {
|
||||
|
||||
function formatDuration(ms) {
|
||||
if (!ms) return "-";
|
||||
const total = Math.floor(ms / 1000);
|
||||
const hours = Math.floor(total / 3600);
|
||||
const minutes = Math.floor(total % 3600 / 60);
|
||||
const seconds = total % 60;
|
||||
return hours ? `${hours}:${String(minutes).padStart(2, "0")}:${String(seconds).padStart(2, "0")}` : `${minutes}:${String(seconds).padStart(2, "0")}`;
|
||||
const totalTenths = Math.floor(ms / 100);
|
||||
const hours = Math.floor(totalTenths / 36000);
|
||||
const minutes = Math.floor(totalTenths % 36000 / 600);
|
||||
const seconds = Math.floor(totalTenths % 600 / 10);
|
||||
const tenths = totalTenths % 10;
|
||||
const base = `${String(minutes).padStart(2, "0")}:${String(seconds).padStart(2, "0")}.${tenths}`;
|
||||
return hours ? `${hours}:${base}` : base;
|
||||
}
|
||||
|
||||
function formatBytes(bytes) {
|
||||
|
||||
Reference in New Issue
Block a user