Fix embedded subtitle discovery and selection - #70
Open
enikesha wants to merge 24 commits into
Open
Conversation
enikesha
force-pushed
the
fix/embedded-subtitles
branch
from
August 29, 2026 08:42
0e97154 to
3d2e5bf
Compare
enikesha
marked this pull request as ready for review
August 30, 2026 12:31
Owner
|
пока что не смотрю PR, я готовлю инфру для инструментейшн тестов, чтобы можно независимо от реального бэка тестировать все сценарии в приложении. я отпишусь сюда дополнительно о том, что всё готово - надо будет покрыть всё тестами. щас ток юнит есть. |
enikesha
force-pushed
the
fix/embedded-subtitles
branch
from
August 31, 2026 20:48
0063b3b to
2f46779
Compare
Owner
|
@enikesha я добавил моковые тесты для плеера, всё в мастере |
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
SubtitleTrackUIState.index lost its last production reader when the positional text-track lookup was deleted, so drop the field and the re-indexing pass it forced on every merge. Also fold the duplicated subtitle file-extension regex into one, fold the tracksRestored flag into resetTrackRestoreState, drop the unconsumed `selected` semantics from SettingsPanelItem, and mark the deliberate SingleSampleMediaSource deprecation instead of leaving a new build warning. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
Twelve tests either restated another test's assertion or asserted that a mapper does nothing. Labelling cases move to SubtitleLabelerTest, which owns them; the merger keeps only the cases where merging itself decides the outcome. select_resolvesSideLoadedRow_byStableKey never reached the stable-key rule (its group id matched first) - reshaped so that rule has coverage for the first time. SubtitleLink.forcedState guessed "forced" from a token in the subtitle URL. It was written when the model had no forced flag; the flag was added later and the comment rewritten to claim older responses omit it, which nothing in the repo supports. Drop the guess and read the API field directly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
The track builders were called both as a single positional line and as a five-line named block, for the same helper in the same file. Fold every call that fits the line limit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
selectStreamUrl picked url.hls4 / url.hls / url.http and then flattened the choice to a String, so PlaybackController pattern-matched the URL text to recover which branch had been taken. Return the container along with the url and thread it through prepare/switchStream. Deletes isHlsStreamUrl, its two regex constants, and HlsStreamUrlTest, whose five cases all defended a guess that no longer happens. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
The stable-key rule needed a track's format id to change while its label stayed put. Merged source children are fixed at construction, so that never happens; the test for it had to be contrived to reach the rule. Also drop the resolver test that asserted matcher ordering rather than any outcome a viewer can observe. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GEBLAtGvP5AHqHemWgLXAp
The player focus test constructs SubtitleTrackUIState positionally, and this branch removed the leading index field, so the instrumentation androidTest source stopped compiling once it moved onto current master. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQZbbPpsQNTRYLV15Lt5Bz
enikesha
force-pushed
the
fix/embedded-subtitles
branch
from
September 2, 2026 18:34
2f46779 to
cfe1a06
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Checks