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

Chromecast episode and mirror actions fail on later seasons due to a global episode index

Aperta Adatta ai principianti
#3,274 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@aslafy-z ci sta già lavorando.

Dal 22/10/2026.

  • #3275 di @aslafy-z — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
android, kotlin
Ambito
backend, mobile

Direzione di ricerca

Leggi ResultViewModel2.postEpisodes, il raggruppamento per stagione o doppiaggio e la chiamata a startChromecast che passa result.index insieme a eps; poi controlla il controllo dei limiti di CastHelper.startCast. Ricava la posizione dell’episodio selezionato nell’elenco di stagioni fornito tramite ID e ritorna in sicurezza se è assente. Il lavoro è completato quando Cast episode e Cast mirror caricano l’episodio selezionato dalle stagioni successive.

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

Descrizione

Steps to reproduce
  1. On CloudStream 4.8.0-pre, open a show with multiple available seasons and playable Cast links.
  2. Connect to a Chromecast using the app's standard Cast button.
  3. Use Cast episode or Cast mirror on the first available season: playback starts.
  4. Select a later season and repeat, choosing an episode whose index across all seasons is greater than or equal to the number of episodes in the selected season.

For a minimal data example, season 1 has 3 episodes and season 2 has 2 episodes. The first episode in season 2 has global index 3, but its position in the season's Cast list is 0.

Expected behavior

The selected episode starts playing on the Chromecast, regardless of which season is selected.

Actual behavior

The TV remains on the receiver logo. No loading indicator or playback appears. The Cast helper returns before sending a media load request.

Cloudstream version and commit hash

Reported on 4.8.0-pre. The original installed build's exact commit was not recorded. The code path was verified and the fix built against ad44a64f0cd660433ffc84994369c13336ae4015.

Android version

Not recorded by the reporter.

Logcat

Not available. The failure is explained by the index mismatch below, and the reporter has confirmed the patched APK works on the same device.

Root cause

ResultViewModel2.postEpisodes assigns ResultEpisode.index before grouping episodes by season. startChromecast passes that global result.index together with eps, which contains only the currently selected season/dub group's episodes.

CastHelper.startCast returns false when currentEpisodeIndex >= episodes.size, before sending a load command. If the global index happens to fit inside the season list, it can instead select metadata for a different episode.

Fix and validation

Resolve the selected episode by ID in eps, and pass that list position to startCast. Return safely if the episode is absent.

The test APK uses a separate package and signing certificate for side-by-side installation. The proposed upstream patch changes only the episode index passed to Cast.

Acknowledgements
  • The failure is in the application's Cast episode selection.
  • Existing issues and pull requests were searched; no matching season-index report was found.
Lingua principale
Kotlin
Stelle
11k
Fork
1.1k
Merge medio
3g 5h
PR unite (30g)
14

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 recloudstream/cloudstream

Tutte le issue di recloudstream/cloudstream

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.