Added type options to disable embedded subs
This commit is contained in:
parent
126274c4ea
commit
61d8d40a4a
|
@ -84,7 +84,9 @@ namespace MediaBrowser.Model.Configuration
|
|||
|
||||
public bool AutomaticallyAddToCollection { get; set; }
|
||||
|
||||
public bool DisableEmbeddedSubtitles { get; set; }
|
||||
public bool DisableEmbeddedTextSubtitles { get; set; }
|
||||
|
||||
public bool DisableEmbeddedImageSubtitles { get; set; }
|
||||
|
||||
public TypeOptions[] TypeOptions { get; set; }
|
||||
|
||||
|
|
|
@ -229,10 +229,16 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||
video.Video3DFormat ??= mediaInfo.Video3DFormat;
|
||||
}
|
||||
|
||||
if (libraryOptions.DisableEmbeddedSubtitles)
|
||||
if (libraryOptions.DisableEmbeddedImageSubtitles)
|
||||
{
|
||||
_logger.LogDebug("Disabling embedded subtitles for {Path} due to DisableEmbeddedSubtitles setting", video.Path);
|
||||
mediaStreams.RemoveAll(i => i.Type == MediaStreamType.Subtitle && !i.IsExternal);
|
||||
_logger.LogDebug("Disabling embedded image subtitles for {Path} due to DisableEmbeddedImageSubtitles setting", video.Path);
|
||||
mediaStreams.RemoveAll(i => i.Type == MediaStreamType.Subtitle && !i.IsExternal && !i.IsTextSubtitleStream);
|
||||
}
|
||||
|
||||
if (libraryOptions.DisableEmbeddedTextSubtitles)
|
||||
{
|
||||
_logger.LogDebug("Disabling embedded text subtitles for {Path} due to DisableEmbeddedTextSubtitles setting", video.Path);
|
||||
mediaStreams.RemoveAll(i => i.Type == MediaStreamType.Subtitle && !i.IsExternal && i.IsTextSubtitleStream);
|
||||
}
|
||||
|
||||
var videoStream = mediaStreams.FirstOrDefault(i => i.Type == MediaStreamType.Video);
|
||||
|
|
Loading…
Reference in New Issue
Block a user