- add an option for dropping specific subtitle formats using the DLNA SubtitleProfile

This commit is contained in:
Marius Luca
2021-11-28 11:42:51 +02:00
parent 13ac3e3665
commit 7d86ef6f22
3 changed files with 15 additions and 3 deletions

View File

@@ -1220,7 +1220,9 @@ namespace MediaBrowser.Model.Dlna
{
var subtitleProfile = GetSubtitleProfile(item, subtitleStream, options.Profile.SubtitleProfiles, playMethod, _transcoderSupport, item.Container, null);
if (subtitleProfile.Method != SubtitleDeliveryMethod.External && subtitleProfile.Method != SubtitleDeliveryMethod.Embed)
if (subtitleProfile.Method != SubtitleDeliveryMethod.Drop
&& subtitleProfile.Method != SubtitleDeliveryMethod.External
&& subtitleProfile.Method != SubtitleDeliveryMethod.Embed)
{
_logger.LogDebug("Not eligible for {0} due to unsupported subtitles", playMethod);
return (false, TranscodeReason.SubtitleCodecNotSupported);

View File

@@ -25,6 +25,11 @@ namespace MediaBrowser.Model.Dlna
/// <summary>
/// Serve the subtitles as a separate HLS stream.
/// </summary>
Hls = 3
Hls = 3,
/// <summary>
/// Drop the subtitle.
/// </summary>
Drop = 4
}
}