Merge pull request #183 from simoncaron/feat/hide-zero-hour

feat: Hide 0h on play button when media length is lower than an hour
This commit is contained in:
Fredrik Burmester
2024-10-13 08:51:27 +02:00
committed by GitHub

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 = (