Skip to content

Fix player track selection handling#400

Merged
oxyroid merged 2 commits into
masterfrom
copilot/check-player-track-issues
May 26, 2026
Merged

Fix player track selection handling#400
oxyroid merged 2 commits into
masterfrom
copilot/check-player-track-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 26, 2026

Summary

Player track selection could target the wrong stream because UI/ViewModel state only carried Format, losing the Media3 group/index identity. Clearing selected tracks also disabled entire audio/video track types instead of restoring automatic selection.

  • Preserve TrackGroup + index in the track selection model.
  • Route UI selections through exact Media3 track identity.
  • Make clear-track behavior safe:
    • subtitles: clear and disable text tracks
    • audio/video: clear override and keep track type enabled
  • Localize track type labels and improve unknown/partial format display fallbacks.
  • Fix the track bottom sheet compile error caused by the renamed tracks parameter.

AI Agent Checklist

Before submitting this PR, confirm:

  • I identified the task type.
  • I read the root AGENTS.md.
  • I read all relevant directory-level AGENTS.md files.
  • I avoided unrelated refactors.
  • I respected module dependency boundaries.
  • I did not move low-level data access into UI.
  • I did not introduce unnecessary dependencies.
  • I ran the smallest relevant validation command.
  • I documented any validation that could not be run.
  • I listed risks or compatibility concerns.

Instructions Read

List the instruction files read for this change:

  • AGENTS.md
  • app/AGENTS.md
  • app/tv/AGENTS.md
  • business/AGENTS.md
  • data/AGENTS.md
  • i18n/AGENTS.md
  • docs/ai/playbooks/playback-pipeline.md
  • docs/ai/VALIDATION_MATRIX.md

Validation

Commands run:

git diff --check
./gradlew cleanManagedDevices --unused-only :app:smartphone:assembleRelease :app:tv:assembleRelease

Results:

git diff --check: passed

./gradlew cleanManagedDevices --unused-only :app:smartphone:assembleRelease :app:tv:assembleRelease: passed

GitHub Android CI run 26443663778: passed

CodeQL: no code changes detected for languages that CodeQL can analyze, so no analysis was performed.

Commands not run:

None

Reason:

All requested full compile validation was run successfully after initializing required submodules.

Risk Notes

Mention any risk areas:

  • API compatibility: PlayerManager.tracks/currentTracks now expose PlayerTrack instead of raw Format.
  • Database migration: none.
  • Playback behavior: audio/video clear now restores automatic selection instead of disabling the track type.
  • TV focus behavior: none; TV UI unchanged.
  • Resource/i18n behavior: added default and zh-CN strings for track labels/fallback.
  • Performance: no expected impact.
  • Binary size: negligible resource-only increase.

@oxyroid
Copy link
Copy Markdown
Owner

oxyroid commented May 26, 2026

@copilot 修复 CI 问题,你必须要经过完整编译验证,如果 GitHub Cloud Agent 环境有问题让你无法访问 submodules,请跟我说如何给你配置

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 26, 2026

@copilot 修复 CI 问题,你必须要经过完整编译验证,如果 GitHub Cloud Agent 环境有问题让你无法访问 submodules,请跟我说如何给你配置

已修复,提交 3e126ef。我用 GitHub Actions 日志定位到 CI 实际失败是 FormatsBottomSheet.kt 中遗漏的 formats.size 引用,不是 submodule 权限问题;本地初始化 submodules 后已完整验证 ./gradlew cleanManagedDevices --unused-only :app:smartphone:assembleRelease :app:tv:assembleRelease 通过,新的 Android CI run 26443663778 也已通过。Cloud Agent 如需预先配置 submodules,可在 .github/workflows/copilot-setup-steps.yml 中使用 actions/checkout 并设置 submodules: recursive

Copilot AI requested a review from oxyroid May 26, 2026 09:33
@oxyroid oxyroid merged commit eb72c34 into master May 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants