Enhancement: Add support for 'extracting' status and display additional progress information in EPGsTable

This commit is contained in:
SergeantPanda 2025-12-04 15:28:21 -06:00
parent 5693ee7f9e
commit 6c8270d0e5
2 changed files with 56 additions and 8 deletions

View file

@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- **Performance**: EPG program parsing optimized for sources with many channels but only a fraction mapped. Now parses XML file once per source instead of once per channel, dramatically reducing I/O and CPU overhead. For sources with 10,000 channels and 100 mapped, this results in ~99x fewer file opens and ~100x fewer full file scans. Orphaned programs for unmapped channels are also cleaned up during refresh to prevent database bloat. Database updates are now atomic to prevent clients from seeing empty/partial EPG data during refresh.
- EPG table now displays detailed status messages including refresh progress, success messages, and last message for idle sources (matching M3U table behavior)
- IPv6 access now allowed by default with all IPv6 CIDRs accepted - Thanks [@adrianmace](https://github.com/adrianmace)
- nginx.conf updated to bind to both IPv4 and IPv6 ports - Thanks [@jordandalley](https://github.com/jordandalley)

View file

@ -160,6 +160,9 @@ const EPGsTable = () => {
case 'downloading':
label = 'Downloading';
break;
case 'extracting':
label = 'Extracting';
break;
case 'parsing_channels':
label = 'Parsing Channels';
break;
@ -170,6 +173,22 @@ const EPGsTable = () => {
return null;
}
// Build additional info string from progress data
let additionalInfo = '';
if (progress.message) {
additionalInfo = progress.message;
} else if (
progress.processed !== undefined &&
progress.channels !== undefined
) {
additionalInfo = `${progress.processed.toLocaleString()} programs for ${progress.channels} channels`;
} else if (
progress.processed !== undefined &&
progress.total !== undefined
) {
additionalInfo = `${progress.processed.toLocaleString()} / ${progress.total.toLocaleString()}`;
}
return (
<Stack spacing={2}>
<Text size="xs">
@ -181,7 +200,14 @@ const EPGsTable = () => {
style={{ margin: '2px 0' }}
/>
{progress.speed && (
<Text size="xs">Speed: {parseInt(progress.speed)} KB/s</Text>
<Text size="xs" c="dimmed">
Speed: {parseInt(progress.speed)} KB/s
</Text>
)}
{additionalInfo && (
<Text size="xs" c="dimmed" lineClamp={1}>
{additionalInfo}
</Text>
)}
</Stack>
);
@ -286,14 +312,35 @@ const EPGsTable = () => {
// Show success message for successful sources
if (data.status === 'success') {
const successMessage =
data.last_message || 'EPG data refreshed successfully';
return (
<Text
c="dimmed"
size="xs"
style={{ color: theme.colors.green[6], lineHeight: 1.3 }}
>
EPG data refreshed successfully
</Text>
<Tooltip label={successMessage} multiline width={300}>
<Text
c="dimmed"
size="xs"
lineClamp={2}
style={{ color: theme.colors.green[6], lineHeight: 1.3 }}
>
{successMessage}
</Text>
</Tooltip>
);
}
// Show last_message for idle sources (from previous refresh)
if (data.status === 'idle' && data.last_message) {
return (
<Tooltip label={data.last_message} multiline width={300}>
<Text
c="dimmed"
size="xs"
lineClamp={2}
style={{ lineHeight: 1.3 }}
>
{data.last_message}
</Text>
</Tooltip>
);
}