fix(plex): show PGS subtitles when transcoding (#1399)

* fix(plex): show PGS subtitles when transcoding

Bitmap subtitles (PGS/VOBSUB) disappeared from the menu while transcoding on Plex, leaving only "Off". The MKV transcode already supports them, so embed them in the stream like text subs. Now they show up and can be turned on.

* fix(plex): give bitmap subtitle codecs the right sidecar extension

getSubtitleExtension fell back to .srt for vobsub, pgssub and dvb subs. Map them to .sub/.sup so it stays consistent with isImageSubtitleCodec and any sidecar URL or download uses the correct extension.
This commit is contained in:
Huzama Ahmad
2026-06-25 10:50:38 +02:00
committed by GitHub
parent 791433bceb
commit 7b917462c7
8 changed files with 161 additions and 25 deletions
+4 -8
View File
@@ -57,14 +57,10 @@ extension _VideoPlayerBuildMethods on VideoPlayerScreenState {
}
List<MediaSubtitleTrack> _sourceSubtitleTracksForControls() {
final tracks = _currentMediaInfo?.subtitleTracks ?? const <MediaSubtitleTrack>[];
if (!_isTranscoding) return tracks;
return tracks
.where((track) {
final hasKey = track.key != null && track.key!.isNotEmpty;
return hasKey || CodecUtils.isTextSubtitleCodec(track.codec);
})
.toList(growable: false);
return selectableSourceSubtitleTracks(
_currentMediaInfo?.subtitleTracks ?? const <MediaSubtitleTrack>[],
isTranscoding: _isTranscoding,
);
}
Widget _buildLoadingSpinner() {