GetProgramsDto.cs 4.7 KB

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