ChannelFeatures.cs 2.1 KB

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