feat: run full refresh with EPG rematching
Run full live catalog refreshes through live source sync, complete channel analysis, EPG source refresh, and persisted EPG rematching while keeping check-new incremental. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -5,6 +5,9 @@
|
||||
})(typeof globalThis !== 'undefined' ? globalThis : this, function () {
|
||||
const BUSY_STATUSES = new Set(['queued', 'building', 'running']);
|
||||
const FAILED_STATUSES = new Set(['error', 'failed']);
|
||||
const INDETERMINATE_PHASES = new Set([
|
||||
'writing', 'refreshing_live_sources', 'refreshing_epg_sources', 'writing_epg_matches'
|
||||
]);
|
||||
|
||||
function progressValues(status, phase) {
|
||||
if (phase === 'laya_identity') {
|
||||
@ -33,7 +36,7 @@
|
||||
const progress = progressValues(status, phase);
|
||||
const processed = Number(progress.processed);
|
||||
const total = Number(progress.total);
|
||||
const determined = busy && phase !== 'writing' &&
|
||||
const determined = busy && !INDETERMINATE_PHASES.has(phase) &&
|
||||
progress.processed !== null && progress.processed !== undefined &&
|
||||
progress.total !== null && progress.total !== undefined &&
|
||||
Number.isFinite(processed) && Number.isFinite(total) && total > 0;
|
||||
@ -42,7 +45,15 @@
|
||||
: null;
|
||||
const previouslyCompleted = Boolean(status.completedAt) || Number(status.projectedCount) > 0;
|
||||
const statusLabel = busy
|
||||
? phase === 'laya_identity'
|
||||
? phase === 'refreshing_live_sources'
|
||||
? 'Refreshing IPTV sources…'
|
||||
: phase === 'refreshing_epg_sources'
|
||||
? 'Refreshing EPG data…'
|
||||
: ['matching_epg', 'laya_epg_matching'].includes(phase)
|
||||
? 'Matching channels to EPG data…'
|
||||
: phase === 'writing_epg_matches'
|
||||
? 'Finalizing…'
|
||||
: phase === 'laya_identity'
|
||||
? 'Analyzing with local AI…'
|
||||
: phase === 'laya_language'
|
||||
? 'Detecting stream languages…'
|
||||
@ -52,7 +63,7 @@
|
||||
? 'Saving channel catalog…'
|
||||
: 'Analyzing channels…'
|
||||
: complete ? 'Analysis complete' : failed ? 'Analysis failed' : 'Ready to analyze';
|
||||
const progressText = phase === 'writing' && busy
|
||||
const progressText = ['writing', 'writing_epg_matches'].includes(phase) && busy
|
||||
? 'Finalizing…'
|
||||
: progressPercent === null
|
||||
? (busy ? 'In progress…' : '')
|
||||
|
||||
Reference in New Issue
Block a user