LiveTvOptions.cs 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. using System;
  2. using MediaBrowser.Model.Dto;
  3. namespace MediaBrowser.Model.LiveTv
  4. {
  5. public class LiveTvOptions
  6. {
  7. public int? GuideDays { get; set; }
  8. public string RecordingPath { get; set; }
  9. public string MovieRecordingPath { get; set; }
  10. public string SeriesRecordingPath { get; set; }
  11. public bool EnableRecordingSubfolders { get; set; }
  12. public bool EnableOriginalAudioWithEncodedRecordings { get; set; }
  13. public TunerHostInfo[] TunerHosts { get; set; }
  14. public ListingsProviderInfo[] ListingProviders { get; set; }
  15. public int PrePaddingSeconds { get; set; }
  16. public int PostPaddingSeconds { get; set; }
  17. public string[] MediaLocationsCreated { get; set; }
  18. public string RecordingPostProcessor { get; set; }
  19. public string RecordingPostProcessorArguments { get; set; }
  20. public LiveTvOptions()
  21. {
  22. TunerHosts = Array.Empty<TunerHostInfo>();
  23. ListingProviders = Array.Empty<ListingsProviderInfo>();
  24. MediaLocationsCreated = Array.Empty<string>();
  25. RecordingPostProcessorArguments = "\"{path}\"";
  26. }
  27. }
  28. public class TunerHostInfo
  29. {
  30. public string Id { get; set; }
  31. public string Url { get; set; }
  32. public string Type { get; set; }
  33. public string DeviceId { get; set; }
  34. public string FriendlyName { get; set; }
  35. public bool ImportFavoritesOnly { get; set; }
  36. public bool AllowHWTranscoding { get; set; }
  37. public bool EnableStreamLooping { get; set; }
  38. public string Source { get; set; }
  39. public int TunerCount { get; set; }
  40. public string UserAgent { get; set; }
  41. public TunerHostInfo()
  42. {
  43. AllowHWTranscoding = true;
  44. }
  45. }
  46. public class ListingsProviderInfo
  47. {
  48. public string Id { get; set; }
  49. public string Type { get; set; }
  50. public string Username { get; set; }
  51. public string Password { get; set; }
  52. public string ListingsId { get; set; }
  53. public string ZipCode { get; set; }
  54. public string Country { get; set; }
  55. public string Path { get; set; }
  56. public string[] EnabledTuners { get; set; }
  57. public bool EnableAllTuners { get; set; }
  58. public string[] NewsCategories { get; set; }
  59. public string[] SportsCategories { get; set; }
  60. public string[] KidsCategories { get; set; }
  61. public string[] MovieCategories { get; set; }
  62. public NameValuePair[] ChannelMappings { get; set; }
  63. public string MoviePrefix { get; set; }
  64. public string PreferredLanguage { get; set; }
  65. public string UserAgent { get; set; }
  66. public ListingsProviderInfo()
  67. {
  68. NewsCategories = new[] { "news", "journalism", "documentary", "current affairs" };
  69. SportsCategories = new[] { "sports", "basketball", "baseball", "football" };
  70. KidsCategories = new[] { "kids", "family", "children", "childrens", "disney" };
  71. MovieCategories = new[] { "movie" };
  72. EnabledTuners = Array.Empty<string>();
  73. EnableAllTuners = true;
  74. ChannelMappings = Array.Empty<NameValuePair>();
  75. }
  76. }
  77. }