jellyfin/MediaBrowser.Model/Configuration/LibraryOptions.cs

120 lines
3.7 KiB
C#
Raw Normal View History

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