Chromecast episode and mirror actions fail on later seasons due to a global episode index
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Đọc ResultViewModel2.postEpisodes, cách nhóm theo mùa hoặc bản lồng tiếng, và lệnh gọi startChromecast truyền result.index cùng với eps; sau đó kiểm tra phần kiểm tra giới hạn của CastHelper.startCast. Tìm vị trí của tập đã chọn trong danh sách mùa được cung cấp bằng ID và trả về an toàn nếu không tìm thấy. Hoàn thành khi Cast episode và Cast mirror tải tập đã chọn từ các mùa sau.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Steps to reproduce
- On CloudStream 4.8.0-pre, open a show with multiple available seasons and playable Cast links.
- Connect to a Chromecast using the app's standard Cast button.
- Use Cast episode or Cast mirror on the first available season: playback starts.
- 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.
- Minimal source patch
- Patched APK, full corresponding source and checksums
- The reporter confirmed the patched APK resolves the issue on their device.
- Release APK compilation succeeded; all 8 existing app unit tests passed. Those tests cover subtitle selection, not this Cast scenario.
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.
- Ngôn ngữ chính
- Kotlin
- Star
- 11k
- Fork
- 1.1k
- Merge trung bình
- 3 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của recloudstream/cloudstream
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
recloudstream/cloudstream#3272 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Add new fonts for subtitlesĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
recloudstream/cloudstream#3100 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
recloudstream/cloudstream#2639 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Quality of videoĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
recloudstream/cloudstream#3270 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Full CustomisationĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
recloudstream/cloudstream#3263 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của recloudstream/cloudstream
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
lugassawan/swe-workbench#823 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
Droid-Deck/DroidDeck#1355 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
IronCoreLabs/ironcore-alloy#351 ·
-
Lovelace refine Taak
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
MinBZK/MijnOverheidZakelijk#1383 ·