Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#701 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
android, kotlin
Área
mobile

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
Kotlin
Estrellas
760
Forks
122
Merge medio
15 h 3 min
PR fusionados (30 d)
62

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ProdigyV21/ARVIO

Todos los issues de ProdigyV21/ARVIO

Issues similares

Más issues de Kotlin

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.