fix(player): preserve addon subtitle provider identity - #1840
Open
i7xre wants to merge 1 commit into
Open
Conversation
i7xre
force-pushed
the
fix/1800-subtitle-selection-ownership
branch
2 times, most recently
from
September 6, 2026 11:12
a9a0cb2 to
d59d5c0
Compare
i7xre
marked this pull request as ready for review
September 6, 2026 11:33
i7xre
force-pushed
the
fix/1800-subtitle-selection-ownership
branch
from
September 6, 2026 11:41
d59d5c0 to
68f7a4a
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.
Summary
Focused follow-up to #1800: preserve exact addon/provider subtitle-row selection when multiple providers legitimately reference the same subtitle URL.
PR type
Why
Selecting a later provider row previously reduced the selected identity to its URL. Runtime URL resolution then selected the first provider with that URL, making the highlighted provider jump even though playback resource was unchanged.
How it works
SubtitleSelectionOption.Addon.idis now the provider-qualifiedoptionId/selectionKey(addon:<provider>:<subtitle-id>:<legacy-url-key>). A tap therefore stores and resolves that exact row key first:tap ElfHosted row → selected optionId → resolver returns ElfHosted row.addon.urlremains unchanged and is used only as playback resource plus legacy URL fallback, so providers sharing one URL can still play that resource without losing which provider row user chose.Issue or approval
Fixes #1888.
UI / behavior impact
Exact provider-row selection now remains stable. Playback still receives
addon.url.Policy check
Scope boundaries
SubtitleSelectionModel.ktproduction behavior changes.SubtitleModal, runtime callback, preference-storage, ownership, fling, backend, player-engine, or diagnostic changes.return firstOrNull { it.id == selectedId }.Testing
AIOStreams | ElfHosted; actualOpenSubtitles v3.gradlew.bat :composeApp:testAndroidHostTest :androidApp:assembleFullDebug --console=plainBUILD SUCCESSFULgit diff --checkpassed.Screenshots / Video
No UI layout or design change. Reproduction evidence:
befor.mp4
after.mp4
Breaking changes
None. Legacy URL-only selections remain readable and use existing URL fallback when no exact provider-qualified selection is available.
Linked issues
Fixes #1888.