mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-24 02:02:09 +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',
|
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 (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* Metadata Source Selector removed */}
|
{/* Metadata Source Selector removed */}
|
||||||
|
|
@ -118,13 +126,7 @@ const MetadataDetails: React.FC<MetadataDetailsProps> = ({
|
||||||
)}
|
)}
|
||||||
{metadata.runtime && (
|
{metadata.runtime && (
|
||||||
<Text style={[styles.metaText, { color: currentTheme.colors.text }]}>
|
<Text style={[styles.metaText, { color: currentTheme.colors.text }]}>
|
||||||
{(() => {
|
{formatRuntime(metadata.runtime)}
|
||||||
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`;
|
|
||||||
})()}
|
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
{metadata.certification && (
|
{metadata.certification && (
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue