playback: Fix subtitle visibility leakage and filter missing episodes#496
Merged
RadicalMuffinMan merged 1 commit intoJun 11, 2026
Conversation
58bd2ff to
38b97b4
Compare
Contributor
|
rebase on main |
38b97b4 to
1a05cb3
Compare
RadicalMuffinMan
requested changes
Jun 11, 2026
|
|
||
| int? get activeSubtitleTrackIndex => null; | ||
|
|
||
| Future<int?> getActiveSubtitleTrackIndexAsync() async => null; |
Contributor
There was a problem hiding this comment.
Suggested change
| Future<int?> getActiveSubtitleTrackIndexAsync() async => null; |
dead code not used by anything
| return null; | ||
| } | ||
|
|
||
| Future<int?> getSubtitleStreamIndexAsync() async { |
Contributor
There was a problem hiding this comment.
116 - 128 can be deleted. dead code not used by anything
| @override | ||
| int? get activeSubtitleTrackIndex => null; | ||
|
|
||
| @override |
Contributor
There was a problem hiding this comment.
Suggested change
| @override |
dead code not used by anything
| int? get activeSubtitleTrackIndex => null; | ||
|
|
||
| @override | ||
| Future<int?> getActiveSubtitleTrackIndexAsync() async => null; |
Contributor
There was a problem hiding this comment.
Suggested change
| Future<int?> getActiveSubtitleTrackIndexAsync() async => null; |
dead code not used by anything
| @override | ||
| int? get activeSubtitleTrackIndex => null; | ||
|
|
||
| @override |
Contributor
There was a problem hiding this comment.
Suggested change
| @override |
dead code not used by anything
| @override | ||
| int? get activeSubtitleTrackIndex => null; | ||
|
|
||
| @override |
Contributor
There was a problem hiding this comment.
Suggested change
| @override |
dead code not used by anything
| int? get activeSubtitleTrackIndex => null; | ||
|
|
||
| @override | ||
| Future<int?> getActiveSubtitleTrackIndexAsync() async => null; |
Contributor
There was a problem hiding this comment.
Suggested change
| Future<int?> getActiveSubtitleTrackIndexAsync() async => null; |
dead code not used by anything
| @override | ||
| int? get activeSubtitleTrackIndex => null; | ||
|
|
||
| @override |
Contributor
There was a problem hiding this comment.
Suggested change
| @override |
| int? get activeSubtitleTrackIndex => null; | ||
|
|
||
| @override | ||
| Future<int?> getActiveSubtitleTrackIndexAsync() async => null; |
Contributor
There was a problem hiding this comment.
Suggested change
| Future<int?> getActiveSubtitleTrackIndexAsync() async => null; |
| return null; | ||
| } | ||
|
|
||
| @override |
Contributor
There was a problem hiding this comment.
1265 - 1288 can be deleted. dead code not used by anything
…ue missing episodes - Prevent subtitle visibility state leaking between tracks on MediaKit backend. - Filter out missing/virtual episodes and specials from play queues. - Asynchronously query native subtitle track to synchronize the UI subtitle track selector when auto-selected. - Fix broken unit tests from audio pref migrations. - Change all player backend classes to extend PlayerBackend instead of implements PlayerBackend to allow clean default property inheritance. - Simplify getActiveSubtitleTrackIndexAsync in MediaKitPlayerBackend to return the activeSubtitleTrackIndex getter directly, removing duplicate native querying block. - Remove redundant activeSubtitleTrackIndex and getActiveSubtitleTrackIndexAsync overrides in html_video_backend_web, html_video_backend_stub, media3_player_backend, and tizen_player_backend. - Clean up unused import in tizen_player_backend.
1a05cb3 to
67b2c37
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.
Pull Request
Summary
This PR resolves two playback issues reported in issue #198:
null.Additionally, it resolves the UI synchronization issue where auto-selected/default subtitles are active during playback, but the subtitle track selector dialog incorrectly highlights "Off" instead of the active track.
Related Issues
Type of Change
Changes Made
packages/playback_core):PlaybackManagerto only disable subtitles when the user or server has explicitly set them to-1(disabled). Whennull, the backend is allowed to auto-select and display subtitles.activeSubtitleTrackIndexgetter toPlayerBackendinterface.subtitleStreamIndexgetter inPlaybackManagerto query the player backend for the active native subtitle track and map it back to the JellyfinstreamIndexwhen_subtitleStreamIndexisnull(auto-selected). This ensures the UI subtitle selection highlights the currently active track instead of displaying "Off".MediaKitPlayerBackend, reset the nativempvplayer's subtitle properties (sidto'auto',secondary-sidto'no',sub-visibilityto'yes',sub-assto'yes') on starting any new playback. This prevents subtitle disable state from leaking from previous tracks.activeSubtitleTrackIndexto query_player.state.track.subtitleand resolve the 1-based native track index.activeSubtitleTrackIndexinMedia3PlayerBackend,TizenPlayerBackend, andHtmlVideoBackendto returnnull(not supported/applicable).ItemDetailScreen(Season, Episode, and Shuffle playback triggers) to exclude missing episodes and virtual placeholder items usingisEligibleNextEpisodeCandidate._nextSeasonItemsProviderinPlaybackModuleusingisEligibleNextEpisodeCandidate.audio_migration_test.dartfrompref_audio_preference_split_v1topref_audio_preference_split_v2to align with the active implementation and restore 100% test success.Platform
Testing
Test Steps
Screenshots (if applicable)
N/A
Checklist