aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MediaBrowser.Model/Configuration/LibraryOptions.cs2
-rw-r--r--MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs6
2 files changed, 8 insertions, 0 deletions
diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs
index d3ce6aa7f..5b77d22fa 100644
--- a/MediaBrowser.Model/Configuration/LibraryOptions.cs
+++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs
@@ -84,6 +84,8 @@ namespace MediaBrowser.Model.Configuration
public 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.cs
index 77372e063..bfe66ca9f 100644
--- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
+++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
@@ -229,6 +229,12 @@ namespace MediaBrowser.Providers.MediaInfo
video.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;