LibraryOptions.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #pragma warning disable CS1591
  2. using System;
  3. namespace MediaBrowser.Model.Configuration
  4. {
  5. public class LibraryOptions
  6. {
  7. public LibraryOptions()
  8. {
  9. TypeOptions = Array.Empty<TypeOptions>();
  10. DisabledSubtitleFetchers = Array.Empty<string>();
  11. SubtitleFetcherOrder = Array.Empty<string>();
  12. DisabledLocalMetadataReaders = Array.Empty<string>();
  13. SkipSubtitlesIfAudioTrackMatches = true;
  14. RequirePerfectSubtitleMatch = true;
  15. AllowEmbeddedSubtitles = EmbeddedSubtitleOptions.AllowAll;
  16. AutomaticallyAddToCollection = false;
  17. EnablePhotos = true;
  18. SaveSubtitlesWithMedia = true;
  19. PathInfos = Array.Empty<MediaPathInfo>();
  20. EnableAutomaticSeriesGrouping = true;
  21. SeasonZeroDisplayName = "Specials";
  22. }
  23. public bool EnablePhotos { get; set; }
  24. public bool EnableRealtimeMonitor { get; set; }
  25. public bool EnableLUFSScan { get; set; }
  26. public bool EnableChapterImageExtraction { get; set; }
  27. public bool ExtractChapterImagesDuringLibraryScan { get; set; }
  28. public MediaPathInfo[] PathInfos { get; set; }
  29. public bool SaveLocalMetadata { get; set; }
  30. [Obsolete("Disable remote providers in TypeOptions instead")]
  31. public bool EnableInternetProviders { get; set; }
  32. public bool EnableAutomaticSeriesGrouping { get; set; }
  33. public bool EnableEmbeddedTitles { get; set; }
  34. public bool EnableEmbeddedExtrasTitles { get; set; }
  35. public bool EnableEmbeddedEpisodeInfos { get; set; }
  36. public int AutomaticRefreshIntervalDays { get; set; }
  37. /// <summary>
  38. /// Gets or sets the preferred metadata language.
  39. /// </summary>
  40. /// <value>The preferred metadata language.</value>
  41. public string? PreferredMetadataLanguage { get; set; }
  42. /// <summary>
  43. /// Gets or sets the metadata country code.
  44. /// </summary>
  45. /// <value>The metadata country code.</value>
  46. public string? MetadataCountryCode { get; set; }
  47. public string SeasonZeroDisplayName { get; set; }
  48. public string[]? MetadataSavers { get; set; }
  49. public string[] DisabledLocalMetadataReaders { get; set; }
  50. public string[]? LocalMetadataReaderOrder { get; set; }
  51. public string[] DisabledSubtitleFetchers { get; set; }
  52. public string[] SubtitleFetcherOrder { get; set; }
  53. public bool SkipSubtitlesIfEmbeddedSubtitlesPresent { get; set; }
  54. public bool SkipSubtitlesIfAudioTrackMatches { get; set; }
  55. public string[]? SubtitleDownloadLanguages { get; set; }
  56. public bool RequirePerfectSubtitleMatch { get; set; }
  57. public bool SaveSubtitlesWithMedia { get; set; }
  58. public bool AutomaticallyAddToCollection { get; set; }
  59. public EmbeddedSubtitleOptions AllowEmbeddedSubtitles { get; set; }
  60. public TypeOptions[] TypeOptions { get; set; }
  61. public TypeOptions? GetTypeOptions(string type)
  62. {
  63. foreach (var options in TypeOptions)
  64. {
  65. if (string.Equals(options.Type, type, StringComparison.OrdinalIgnoreCase))
  66. {
  67. return options;
  68. }
  69. }
  70. return null;
  71. }
  72. }
  73. }