feat: Hide 0h on play button when media length is lower than an hour

This commit is contained in:
Simon Caron
2024-10-12 14:27:51 -04:00
parent d7eb25edf4
commit 04b24ee86b

View File

@@ -16,7 +16,8 @@ export const runtimeTicksToMinutes = (
const hours = Math.floor(ticks / ticksPerHour);
const minutes = Math.floor((ticks % ticksPerHour) / ticksPerMinute);
return `${hours}h ${minutes}m`;
if (hours > 0) return `${hours}h ${minutes}m`;
else return `${minutes}m`;
};
export const runtimeTicksToSeconds = (