LibraryOptions.cs 3.0 KB

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