The Free Software Media System - Server Backend & API
Add DisableEmbeddedSubtitles setting Disables embedded subs being added to metadata
Matthew Jones4df7590e52ba
diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.csindex d3ce6aa7fb..5b77d22fac 100644--- a/MediaBrowser.Model/Configuration/LibraryOptions.cs+++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs@@ -84,6 +84,8 @@ namespace MediaBrowser.Model.Configurationpublic bool AutomaticallyAddToCollection { get; set; }+ public bool DisableEmbeddedSubtitles { get; set; }+public TypeOptions[] TypeOptions { get; set; }public TypeOptions? GetTypeOptions(string type)diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.csindex 77372e0635..bfe66ca9fc 100644--- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs+++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs@@ -229,6 +229,12 @@ namespace MediaBrowser.Providers.MediaInfovideo.Video3DFormat ??= mediaInfo.Video3DFormat;}+ if (libraryOptions.DisableEmbeddedSubtitles)+ {+ _logger.LogInformation("Disabling embedded subtitles due to DisableEmbeddedSubtitles setting.");+ mediaStreams.RemoveAll(i => i.Type == MediaStreamType.Subtitle && !i.IsExternal);+ }+var videoStream = mediaStreams.FirstOrDefault(i => i.Type == MediaStreamType.Video);video.Height = videoStream?.Height ?? 0;