mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
The header action and the Workspace sources page each had their own ~60-line implementation of the destructive Xtream refresh, which is why #1421 had to fix the same connectivity-guard bug twice. `XtreamRefreshFlowService` now owns the sequence once; the entry points supply only an `XtreamRefreshProgressReporter`, so neither can reach the guard reset and skip it. Extracting it surfaced a pre-existing race that neither entry point could have fixed alone: the two guards were independent, so the same playlist could be refreshed from both at once and the second run parked an already-emptied catalog over the first run's snapshot, losing favorites, history, hidden categories and playback positions. The shared flow now serializes runs per playlist, refusing a second one before the guard reset. Found by Greptile; the ordering is pinned by a test that fails when the check moves below the reset.