mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-11 17:45:38 +00:00
Merge pull request #157 from CrissZollo/fix-timeline-time
Small fixes to timeline time
This commit is contained in:
commit
43d4db022c
1 changed files with 9 additions and 7 deletions
|
|
@ -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 && (
|
||||
|
|
|
|||
Loading…
Reference in a new issue