GetProgramsDto.cs 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Text.Json.Serialization;
  5. using Jellyfin.Data.Enums;
  6. using Jellyfin.Database.Implementations.Enums;
  7. using Jellyfin.Extensions.Json.Converters;
  8. using MediaBrowser.Model.Entities;
  9. using MediaBrowser.Model.Querying;
  10. namespace Jellyfin.Api.Models.LiveTvDtos;
  11. /// <summary>
  12. /// Get programs dto.
  13. /// </summary>
  14. public class GetProgramsDto
  15. {
  16. /// <summary>
  17. /// Gets or sets the channels to return guide information for.
  18. /// </summary>
  19. [JsonConverter(typeof(JsonCommaDelimitedCollectionConverterFactory))]
  20. public IReadOnlyList<Guid>? ChannelIds { get; set; }
  21. /// <summary>
  22. /// Gets or sets optional. Filter by user id.
  23. /// </summary>
  24. public Guid? UserId { get; set; }
  25. /// <summary>
  26. /// Gets or sets the minimum premiere start date.
  27. /// </summary>
  28. public DateTime? MinStartDate { get; set; }
  29. /// <summary>
  30. /// Gets or sets filter by programs that have completed airing, or not.
  31. /// </summary>
  32. public bool? HasAired { get; set; }
  33. /// <summary>
  34. /// Gets or sets filter by programs that are currently airing, or not.
  35. /// </summary>
  36. public bool? IsAiring { get; set; }
  37. /// <summary>
  38. /// Gets or sets the maximum premiere start date.
  39. /// </summary>
  40. public DateTime? MaxStartDate { get; set; }
  41. /// <summary>
  42. /// Gets or sets the minimum premiere end date.
  43. /// </summary>
  44. public DateTime? MinEndDate { get; set; }
  45. /// <summary>
  46. /// Gets or sets the maximum premiere end date.
  47. /// </summary>
  48. public DateTime? MaxEndDate { get; set; }
  49. /// <summary>
  50. /// Gets or sets filter for movies.
  51. /// </summary>
  52. public bool? IsMovie { get; set; }
  53. /// <summary>
  54. /// Gets or sets filter for series.
  55. /// </summary>
  56. public bool? IsSeries { get; set; }
  57. /// <summary>
  58. /// Gets or sets filter for news.
  59. /// </summary>
  60. public bool? IsNews { get; set; }
  61. /// <summary>
  62. /// Gets or sets filter for kids.
  63. /// </summary>
  64. public bool? IsKids { get; set; }
  65. /// <summary>
  66. /// Gets or sets filter for sports.
  67. /// </summary>
  68. public bool? IsSports { get; set; }
  69. /// <summary>
  70. /// Gets or sets the record index to start at. All items with a lower index will be dropped from the results.
  71. /// </summary>
  72. public int? StartIndex { get; set; }
  73. /// <summary>
  74. /// Gets or sets the maximum number of records to return.
  75. /// </summary>
  76. public int? Limit { get; set; }
  77. /// <summary>
  78. /// Gets or sets specify one or more sort orders, comma delimited. Options: Name, StartDate.
  79. /// </summary>
  80. [JsonConverter(typeof(JsonCommaDelimitedCollectionConverterFactory))]
  81. public IReadOnlyList<ItemSortBy>? SortBy { get; set; }
  82. /// <summary>
  83. /// Gets or sets sort order.
  84. /// </summary>
  85. [JsonConverter(typeof(JsonCommaDelimitedCollectionConverterFactory))]
  86. public IReadOnlyList<SortOrder>? SortOrder { get; set; }
  87. /// <summary>
  88. /// Gets or sets the genres to return guide information for.
  89. /// </summary>
  90. [JsonConverter(typeof(JsonPipeDelimitedCollectionConverterFactory))]
  91. public IReadOnlyList<string>? Genres { get; set; }
  92. /// <summary>
  93. /// Gets or sets the genre ids to return guide information for.
  94. /// </summary>
  95. [JsonConverter(typeof(JsonCommaDelimitedCollectionConverterFactory))]
  96. public IReadOnlyList<Guid>? GenreIds { get; set; }
  97. /// <summary>
  98. /// Gets or sets include image information in output.
  99. /// </summary>
  100. public bool? EnableImages { get; set; }
  101. /// <summary>
  102. /// Gets or sets a value indicating whether retrieve total record count.
  103. /// </summary>
  104. [DefaultValue(true)]
  105. public bool EnableTotalRecordCount { get; set; } = true;
  106. /// <summary>
  107. /// Gets or sets the max number of images to return, per image type.
  108. /// </summary>
  109. public int? ImageTypeLimit { get; set; }
  110. /// <summary>
  111. /// Gets or sets the image types to include in the output.
  112. /// </summary>
  113. [JsonConverter(typeof(JsonCommaDelimitedCollectionConverterFactory))]
  114. public IReadOnlyList<ImageType>? EnableImageTypes { get; set; }
  115. /// <summary>
  116. /// Gets or sets include user data.
  117. /// </summary>
  118. public bool? EnableUserData { get; set; }
  119. /// <summary>
  120. /// Gets or sets filter by series timer id.
  121. /// </summary>
  122. public string? SeriesTimerId { get; set; }
  123. /// <summary>
  124. /// Gets or sets filter by library series id.
  125. /// </summary>
  126. public Guid? LibrarySeriesId { get; set; }
  127. /// <summary>
  128. /// Gets or sets specify additional fields of information to return in the output.
  129. /// </summary>
  130. [JsonConverter(typeof(JsonCommaDelimitedCollectionConverterFactory))]
  131. public IReadOnlyList<ItemFields>? Fields { get; set; }
  132. }