Add DisableEmbeddedSubtitles setting
Disables embedded subs being added to metadata
This commit is contained in:
parent
07e9568de8
commit
4df7590e52
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user