Plex treats a subtitle stream as forced when its title says "Forced" even with the API flag unset. Every forced comparison now uses that effective forced-ness on both sides: the match scorer, the low-metadata hard gate, the Jellyfin OnlyForced/Smart profile modes, and stream-index negotiation. Carrying a track choice into the next episode no longer reuses the same-item identity matchers. A sealed SubtitlePreference (off / track reference / semantic intent) replaces the id-'navigation' pseudo-track through the whole preference channel, and cross-item intents hard-require language and forced-class parity. When the next episode has no track of the same class, the intent declines and selection falls through to the server's own per-episode choice instead of latching onto a full track by position and persisting that mistake back to the server. Intents wait for pending native tracks under the same catalog-completeness rule as source ids, so an early decline cannot retire the selection listener before the real track arrives. Ref #1716
17 lines
708 B
Dart
17 lines
708 B
Dart
import '../media/media_source_info.dart';
|
|
import '../mpv/mpv.dart';
|
|
import 'track_label_builder.dart';
|
|
|
|
/// Effective forced-ness, mirroring server behavior (#1716/#1717): a subtitle
|
|
/// stream counts as forced when its flag is set OR its title says "forced".
|
|
/// Every forced comparison must use these getters on BOTH sides — the raw
|
|
/// flags stay untouched so parsing and the file-info UI keep server truth.
|
|
|
|
extension MediaSubtitleTrackForcedSemantics on MediaSubtitleTrack {
|
|
bool get effectiveForced => forced || titleSaysForced(title) || titleSaysForced(displayTitle);
|
|
}
|
|
|
|
extension SubtitleTrackForcedSemantics on SubtitleTrack {
|
|
bool get effectiveForced => isForced || titleSaysForced(title);
|
|
}
|