Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[BUG]: Live TV full XMLTV guide never auto-loads or refreshes for playlists under 10,000 channels

Aperta
#701 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
android, kotlin
Ambito
mobile

Direzione di ricerca

Start with startCompleteEpgBackfill and the related age and playback checks in app/src/main/kotlin/com/arflix/tv/ui/screens/tv/TvViewModel.kt. Trace how LiveTvScreen.kt sets playback active, how AppNavigation.kt handles Home navigation, and how IptvRepository.kt updates cachedEpgAt; reproduce with a playlist under 10,000 channels. Done means a small playlist loads its full XMLTV guide on first use and refreshes it automatically without Settings → Refresh TV Data.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the Bug

For Xtream playlists with 10,000 live channels or fewer, the full XMLTV guide is effectively never loaded or refreshed automatically. After the guide is loaded once (e.g. by saving the playlist in Settings), it is only fetched again by Settings → TV → Refresh TV Data, so the grid runs out of programme data after the XMLTV window and stays empty ("No programme data" / "Guide pending…"). When a playlist arrives through cloud sync instead of being saved on the device, the full guide is never loaded at all; only the ~10 visible rows get per-channel get_short_epg data.

Playlists above 10,000 channels are fine: they take the large-list path, which streams XMLTV in the background even while Live TV is open (after ~180 s) and refreshes when the full guide is ≥ 6 h old.

From reading the code (links at 4bea02f), three conditions combine for small lists:

  1. The whole Live TV screen counts as playback. LiveTvScreen calls setLiveTvPlaybackActive(true) on entry, before anything plays (LiveTvScreen.kt#L1124), and startCompleteEpgBackfill defers whenever liveTvPlaybackActive && !streamingXmlBackfill (TvViewModel.kt#L1145). streamingXmlBackfill is only true for lists > 10,000 (TvViewModel.kt#L64). Since the backfill is scheduled from the TV ViewModel (created when Live TV opens), it is always deferred.
  2. Going Home cancels the deferred resume. The resume waits 90 s in viewModelScope (TvViewModel.kt#L976), but navigateHome pops the TV back-stack entry (AppNavigation.kt#L174), clearing the ViewModel. It only survives when leaving to Search/Library/Settings.
  3. When it does resume, any recent guide data skips it. It returns early if there is any guide data and cachedEpgAgeMs() < 24 h (TvViewModel.kt#L1182). Every short-EPG refresh resets cachedEpgAt (IptvRepository.kt#L3675), including the visible-row refreshes and the Home favourite-channel refreshes, so the 24 h age is rarely reached.

The only other network XMLTV path is Settings with force = true (SettingsViewModel.kt#L109); the automatic Settings refresh uses force = false (#L2268).

This looks like an interaction between "Pause full EPG backfill during live playback" (698b085d), "cache home screen" (b02fa968, Home pops back) and "smooth guide drawer and seek previews" (fc92603a, whole surface treated as playback).

Steps to Reproduce
  1. Use an Xtream playlist with fewer than 10,000 live channels and a working xmltv.php (tested with ~2,850 channels).
  2. Let the playlist reach the device through ARVIO Cloud sync (not by saving it in Settings on that device), sign in and select the profile.
  3. Open TV. Logcat shows [EPG-Complete] Deferred full guide backfill while live playback is active; only about 10 visible rows get guide data via get_short_epg, the rest stay "Guide pending…".
  4. Go Home, wait several minutes, reopen TV, or restart the app: no xmltv.php request is ever made.
  5. Settings → TV → Refresh TV Data loads the guide immediately (~590 KB gzip, ~12 s on a Shield). Nothing refreshes it again automatically afterwards.

With the same provider serving > 10,000 channels, step 3 instead logs Scheduling large-list full guide index … delay=180s and the full guide loads in the background while Live TV is open.

Expected Behavior

Small playlists should load the full guide on first use and keep it fresh automatically, like large playlists do, without requiring Refresh TV Data.

Possible fixes (any one would help): only set playback active once a channel is actually playing; let the deferred resume survive navigating Home (or re-check when the TV screen is next opened after playback stops); and/or gate the small-list refresh on a full-guide age that short-EPG refreshes do not reset (like completedFullGuideAge for large lists).

Screenshots / Video

N/A (see logs).


Environment & Device Information
Platform (Check and complete the applicable section):
  • Android TV / Google TV / Fire TV
    • Device Model: Nvidia Shield Android TV
    • OS / Firmware: Android TV 11
    • App Version: v1.9.997 built from cf7a680; the relevant logic is unchanged on main (4bea02f)
    • Install Source: Built from source

Affected Component / Feature
  • IPTV / Live TV (M3U / Xtream playlists, EPG guide, stream playback)

Crash Logs / Logcat (If applicable)

Small playlist (2,849 channels), first open of TV, then Home and back:

[EPG] Startup: using warm cached EPG (age=9223372036854775s)
[EPG-Complete] Deferred full guide backfill while live playback is active
[TV-Metrics] category=all loaded=2813/2813 guideWindow=18 start=0
[EPG] Xtream short EPG timed out after 5000ms; keeping 523 fetched listings
[EPG-Complete] Deferred full guide backfill while live playback is active

Same provider with 12,815 channels:

[EPG-Complete] Scheduling large-list full guide index: channels=12815 guideCapable=12815 indexed=0 programs=0 coverage=0% age=9223372036854775s delay=180s
[EPG-Complete] Starting large-list full guide index after idle delay
[EPG-Timing] streamed XMLTV rows=148195 channels=12815 elapsed_ms=27503
Lingua principale
Kotlin
Stelle
760
Fork
122
Merge medio
15h 3m
PR unite (30g)
62

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ProdigyV21/ARVIO

Tutte le issue di ProdigyV21/ARVIO

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.