From 91d143d6ee25a309efadf1575a1efc432adb81cf Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Wed, 26 Jan 2022 16:09:05 +0000 Subject: Changed boolean options to enums --- .../Configuration/EmbeddedSubtitleOptions.cs | 30 ++++++++++++++++++++++ MediaBrowser.Model/Configuration/LibraryOptions.cs | 5 ++-- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 MediaBrowser.Model/Configuration/EmbeddedSubtitleOptions.cs (limited to 'MediaBrowser.Model/Configuration') diff --git a/MediaBrowser.Model/Configuration/EmbeddedSubtitleOptions.cs b/MediaBrowser.Model/Configuration/EmbeddedSubtitleOptions.cs new file mode 100644 index 0000000000..948027603f --- /dev/null +++ b/MediaBrowser.Model/Configuration/EmbeddedSubtitleOptions.cs @@ -0,0 +1,30 @@ +namespace MediaBrowser.Model.Configuration +{ + /// + /// An enum representing the options to disable embedded subs. + /// + public enum EmbeddedSubtitleOptions + { + + /// + /// Allow all embedded subs. + /// + AllowAll, + + /// + /// Allow only embedded subs that are text based. + /// + AllowText, + + /// + /// Allow only embedded subs that are image based. + /// + AllowImage, + + /// + /// Disable all embedded subs. + /// + AllowNone, + } + +} diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs index efa63b5e16..ad3bce86ea 100644 --- a/MediaBrowser.Model/Configuration/LibraryOptions.cs +++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs @@ -15,6 +15,7 @@ namespace MediaBrowser.Model.Configuration SkipSubtitlesIfAudioTrackMatches = true; RequirePerfectSubtitleMatch = true; + AllowEmbeddedSubtitles = EmbeddedSubtitleOptions.AllowAll; AutomaticallyAddToCollection = true; EnablePhotos = true; @@ -84,9 +85,7 @@ namespace MediaBrowser.Model.Configuration public bool AutomaticallyAddToCollection { get; set; } - public bool DisableEmbeddedTextSubtitles { get; set; } - - public bool DisableEmbeddedImageSubtitles { get; set; } + public EmbeddedSubtitleOptions AllowEmbeddedSubtitles { get; set; } public TypeOptions[] TypeOptions { get; set; } -- cgit v1.2.3