Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#3,274 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@aslafy-z đang làm issue này rồi.

Từ ngày 22/10/2026.

  • #3275 của @aslafy-z — đang mở

Đá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
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, kotlin
Lĩnh vực
backend, mobile

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
  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.
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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của recloudstream/cloudstream

Tất cả issue của recloudstream/cloudstream

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.