2020-02-03 19:49:27 -05:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-01-13 15:02:23 -05:00
|
|
|
using System;
|
2018-12-27 18:27:57 -05:00
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Configuration
|
|
|
|
{
|
|
|
|
public class LibraryOptions
|
|
|
|
{
|
2021-02-20 17:13:04 -05:00
|
|
|
public LibraryOptions()
|
|
|
|
{
|
|
|
|
TypeOptions = Array.Empty<TypeOptions>();
|
|
|
|
DisabledSubtitleFetchers = Array.Empty<string>();
|
|
|
|
SubtitleFetcherOrder = Array.Empty<string>();
|
|
|
|
DisabledLocalMetadataReaders = Array.Empty<string>();
|
|
|
|
|
|
|
|
SkipSubtitlesIfAudioTrackMatches = true;
|
|
|
|
RequirePerfectSubtitleMatch = true;
|
2022-01-26 11:09:05 -05:00
|
|
|
AllowEmbeddedSubtitles = EmbeddedSubtitleOptions.AllowAll;
|
2021-02-20 17:13:04 -05:00
|
|
|
|
2022-05-15 20:21:40 -04:00
|
|
|
AutomaticallyAddToCollection = false;
|
2021-02-20 17:13:04 -05:00
|
|
|
EnablePhotos = true;
|
|
|
|
SaveSubtitlesWithMedia = true;
|
|
|
|
PathInfos = Array.Empty<MediaPathInfo>();
|
|
|
|
EnableAutomaticSeriesGrouping = true;
|
|
|
|
SeasonZeroDisplayName = "Specials";
|
|
|
|
}
|
|
|
|
|
2018-12-27 18:27:57 -05:00
|
|
|
public bool EnablePhotos { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2018-12-27 18:27:57 -05:00
|
|
|
public bool EnableRealtimeMonitor { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2023-05-15 07:12:24 -04:00
|
|
|
public bool EnableLUFSScan { get; set; }
|
|
|
|
|
2018-12-27 18:27:57 -05:00
|
|
|
public bool EnableChapterImageExtraction { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2018-12-27 18:27:57 -05:00
|
|
|
public bool ExtractChapterImagesDuringLibraryScan { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2018-12-27 18:27:57 -05:00
|
|
|
public MediaPathInfo[] PathInfos { get; set; }
|
|
|
|
|
|
|
|
public bool SaveLocalMetadata { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2021-12-15 18:37:01 -05:00
|
|
|
[Obsolete("Disable remote providers in TypeOptions instead")]
|
2018-12-27 18:27:57 -05:00
|
|
|
public bool EnableInternetProviders { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2018-12-27 18:27:57 -05:00
|
|
|
public bool EnableAutomaticSeriesGrouping { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2018-12-27 18:27:57 -05:00
|
|
|
public bool EnableEmbeddedTitles { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2022-05-17 17:00:13 -04:00
|
|
|
public bool EnableEmbeddedExtrasTitles { get; set; }
|
|
|
|
|
2020-02-17 08:56:31 -05:00
|
|
|
public bool EnableEmbeddedEpisodeInfos { get; set; }
|
2018-12-27 18:27:57 -05:00
|
|
|
|
|
|
|
public int AutomaticRefreshIntervalDays { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the preferred metadata language.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The preferred metadata language.</value>
|
2021-10-26 07:56:30 -04:00
|
|
|
public string? PreferredMetadataLanguage { get; set; }
|
2018-12-27 18:27:57 -05:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the metadata country code.
|
|
|
|
/// </summary>
|
|
|
|
/// <value>The metadata country code.</value>
|
2021-10-26 07:56:30 -04:00
|
|
|
public string? MetadataCountryCode { get; set; }
|
2018-12-27 18:27:57 -05:00
|
|
|
|
|
|
|
public string SeasonZeroDisplayName { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2021-10-26 07:56:30 -04:00
|
|
|
public string[]? MetadataSavers { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2018-12-27 18:27:57 -05:00
|
|
|
public string[] DisabledLocalMetadataReaders { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2021-10-26 07:56:30 -04:00
|
|
|
public string[]? LocalMetadataReaderOrder { get; set; }
|
2018-12-27 18:27:57 -05:00
|
|
|
|
|
|
|
public string[] DisabledSubtitleFetchers { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2018-12-27 18:27:57 -05:00
|
|
|
public string[] SubtitleFetcherOrder { get; set; }
|
|
|
|
|
|
|
|
public bool SkipSubtitlesIfEmbeddedSubtitlesPresent { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2018-12-27 18:27:57 -05:00
|
|
|
public bool SkipSubtitlesIfAudioTrackMatches { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2021-10-26 07:56:30 -04:00
|
|
|
public string[]? SubtitleDownloadLanguages { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2018-12-27 18:27:57 -05:00
|
|
|
public bool RequirePerfectSubtitleMatch { get; set; }
|
2020-06-15 17:43:52 -04:00
|
|
|
|
2018-12-27 18:27:57 -05:00
|
|
|
public bool SaveSubtitlesWithMedia { get; set; }
|
2021-11-30 18:13:02 -05:00
|
|
|
|
2021-11-18 03:00:14 -05:00
|
|
|
public bool AutomaticallyAddToCollection { get; set; }
|
2018-12-27 18:27:57 -05:00
|
|
|
|
2022-01-26 11:09:05 -05:00
|
|
|
public EmbeddedSubtitleOptions AllowEmbeddedSubtitles { get; set; }
|
2021-12-26 11:18:25 -05:00
|
|
|
|
2018-12-27 18:27:57 -05:00
|
|
|
public TypeOptions[] TypeOptions { get; set; }
|
|
|
|
|
2021-10-26 07:56:30 -04:00
|
|
|
public TypeOptions? GetTypeOptions(string type)
|
2018-12-27 18:27:57 -05:00
|
|
|
{
|
|
|
|
foreach (var options in TypeOptions)
|
|
|
|
{
|
|
|
|
if (string.Equals(options.Type, type, StringComparison.OrdinalIgnoreCase))
|
|
|
|
{
|
|
|
|
return options;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|