Merge pull request #157 from CrissZollo/fix-timeline-time

Small fixes to timeline time
This commit is contained in:
tapframe 2025-10-01 01:31:10 +05:30 committed by GitHub
commit 43d4db022c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,6 +97,14 @@ const MetadataDetails: React.FC<MetadataDetailsProps> = ({
overflow: 'hidden',
}));
function formatRuntime(runtime: string): string {
const r = parseInt(runtime, 10);
if (isNaN(r) || r < 60) return runtime;
const h = Math.floor(r / 60);
const m = r % 60;
return `${h}H ${m}MIN`;
}
return (
<>
{/* Metadata Source Selector removed */}
@ -118,13 +126,7 @@ const MetadataDetails: React.FC<MetadataDetailsProps> = ({
)}
{metadata.runtime && (
<Text style={[styles.metaText, { color: currentTheme.colors.text }]}>
{(() => {
const r = parseInt(metadata.runtime, 10);
if (isNaN(r) || r < 60) return metadata.runtime;
const h = Math.floor(r / 60);
const m = r % 60;
return `${h}H ${m < 10 ? '0' : ''}${m}MIN`;
})()}
{formatRuntime(metadata.runtime)}
</Text>
)}
{metadata.certification && (