fix(player): restore the subtitle sidecar work dropped by the previous commit
The previous commit was assembled from a tree read before 13264e22 landed,
so committing it reverted that commit's changes: the image-based subtitle
filtering in device_profile/types, subtitleTracks and its tests, the
regenerated bindings, and the VideoPlayer menu wiring.
Nothing was lost — the working tree held both changes throughout. This
restores those files to the merged state, leaving both the subtitle fix and
the play-session fix in place.
TRACES: UR-020, UR-004 | DR-176 | UT-168
This commit is contained in:
@@ -555,6 +555,18 @@ impl OnlineRepository {
|
||||
("SegmentContainer", "ts".to_string()),
|
||||
("TranscodingContainer", "ts".to_string()),
|
||||
("TranscodingProtocol", "hls".to_string()),
|
||||
// Say "no subtitle" rather than leaving the choice open. An omitted
|
||||
// index is not neutral: the server then picks the source's own
|
||||
// default/forced track, and an image-based one can only be delivered
|
||||
// by burning it into the picture (DR-176). The negotiation already
|
||||
// sends this sentinel, but most streams are opened by rebuilding
|
||||
// *this* URL — a quality switch, a transcoded seek, an audio-track
|
||||
// switch — so it has to hold here too, independently of whatever
|
||||
// session state the server still holds.
|
||||
(
|
||||
"SubtitleStreamIndex",
|
||||
super::device_profile::playback_subtitle_stream_index().to_string(),
|
||||
),
|
||||
];
|
||||
|
||||
// Scale the picture down to what the budget can carry. Omitted for the
|
||||
@@ -988,15 +1000,28 @@ impl JellyfinItem {
|
||||
media_streams: self.media_streams.map(|streams| {
|
||||
streams
|
||||
.into_iter()
|
||||
.map(|s| crate::repository::types::MediaStream {
|
||||
kind: crate::domain::stream_kind_from_jellyfin(&s.stream_type),
|
||||
stream_type: s.stream_type,
|
||||
codec: s.codec,
|
||||
language: s.language,
|
||||
display_title: s.display_title,
|
||||
index: s.index,
|
||||
is_default: s.is_default,
|
||||
is_forced: s.is_forced,
|
||||
.map(|s| {
|
||||
let kind = crate::domain::stream_kind_from_jellyfin(&s.stream_type);
|
||||
// Only a subtitle can be a sidecar; asked of anything
|
||||
// else the question has no answer. TRACES: UR-020 |
|
||||
// DR-176 | UT-168
|
||||
let supports_external_delivery =
|
||||
(kind == crate::domain::StreamKind::Subtitle).then(|| {
|
||||
super::device_profile::subtitle_supports_external_delivery(
|
||||
s.codec.as_deref(),
|
||||
)
|
||||
});
|
||||
crate::repository::types::MediaStream {
|
||||
kind,
|
||||
stream_type: s.stream_type,
|
||||
codec: s.codec,
|
||||
language: s.language,
|
||||
display_title: s.display_title,
|
||||
index: s.index,
|
||||
is_default: s.is_default,
|
||||
is_forced: s.is_forced,
|
||||
supports_external_delivery,
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user