ChannelFeatures.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. using System.Collections.Generic;
  2. namespace MediaBrowser.Model.Channels
  3. {
  4. public class ChannelFeatures
  5. {
  6. /// <summary>
  7. /// Gets or sets the name.
  8. /// </summary>
  9. /// <value>The name.</value>
  10. public string Name { get; set; }
  11. /// <summary>
  12. /// Gets or sets the identifier.
  13. /// </summary>
  14. /// <value>The identifier.</value>
  15. public string Id { get; set; }
  16. /// <summary>
  17. /// Gets or sets a value indicating whether this instance can search.
  18. /// </summary>
  19. /// <value><c>true</c> if this instance can search; otherwise, <c>false</c>.</value>
  20. public bool CanSearch { get; set; }
  21. /// <summary>
  22. /// Gets or sets the media types.
  23. /// </summary>
  24. /// <value>The media types.</value>
  25. public List<ChannelMediaType> MediaTypes { get; set; }
  26. /// <summary>
  27. /// Gets or sets the content types.
  28. /// </summary>
  29. /// <value>The content types.</value>
  30. public List<ChannelMediaContentType> ContentTypes { get; set; }
  31. /// <summary>
  32. /// Represents the maximum number of records the channel allows retrieving at a time
  33. /// </summary>
  34. public int? MaxPageSize { get; set; }
  35. /// <summary>
  36. /// Gets or sets the default sort orders.
  37. /// </summary>
  38. /// <value>The default sort orders.</value>
  39. public List<ChannelItemSortField> DefaultSortFields { get; set; }
  40. /// <summary>
  41. /// Indicates if a sort ascending/descending toggle is supported or not.
  42. /// </summary>
  43. public bool SupportsSortOrderToggle { get; set; }
  44. /// <summary>
  45. /// Gets or sets a value indicating whether this instance can filter.
  46. /// </summary>
  47. /// <value><c>true</c> if this instance can filter; otherwise, <c>false</c>.</value>
  48. public bool CanFilter { get; set; }
  49. /// <summary>
  50. /// Gets or sets a value indicating whether this instance can download all media.
  51. /// </summary>
  52. /// <value><c>true</c> if this instance can download all media; otherwise, <c>false</c>.</value>
  53. public bool CanDownloadAllMedia { get; set; }
  54. public ChannelFeatures()
  55. {
  56. MediaTypes = new List<ChannelMediaType>();
  57. ContentTypes = new List<ChannelMediaContentType>();
  58. DefaultSortFields = new List<ChannelItemSortField>();
  59. }
  60. }
  61. public enum ChannelItemSortField
  62. {
  63. Name = 0,
  64. CommunityRating = 1,
  65. PremiereDate = 2,
  66. DateCreated = 3,
  67. Runtime = 4,
  68. PlayCount = 5,
  69. CommunityPlayCount = 6
  70. }
  71. }