ChannelInfoDto.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. using System.ComponentModel;
  2. using System.Diagnostics;
  3. using System.Runtime.Serialization;
  4. using MediaBrowser.Model.Dto;
  5. using MediaBrowser.Model.Entities;
  6. using System;
  7. using System.Collections.Generic;
  8. namespace MediaBrowser.Model.LiveTv
  9. {
  10. /// <summary>
  11. /// Class ChannelInfoDto
  12. /// </summary>
  13. [DebuggerDisplay("Name = {Name}, Number = {Number}")]
  14. public class ChannelInfoDto : INotifyPropertyChanged, IItemDto
  15. {
  16. /// <summary>
  17. /// Gets or sets the name.
  18. /// </summary>
  19. /// <value>The name.</value>
  20. public string Name { get; set; }
  21. /// <summary>
  22. /// Gets or sets the identifier.
  23. /// </summary>
  24. /// <value>The identifier.</value>
  25. public string Id { get; set; }
  26. /// <summary>
  27. /// Gets or sets the external identifier.
  28. /// </summary>
  29. /// <value>The external identifier.</value>
  30. public string ExternalId { get; set; }
  31. /// <summary>
  32. /// Gets or sets the image tags.
  33. /// </summary>
  34. /// <value>The image tags.</value>
  35. public Dictionary<ImageType, Guid> ImageTags { get; set; }
  36. /// <summary>
  37. /// Gets or sets the number.
  38. /// </summary>
  39. /// <value>The number.</value>
  40. public string Number { get; set; }
  41. /// <summary>
  42. /// Gets or sets the name of the service.
  43. /// </summary>
  44. /// <value>The name of the service.</value>
  45. public string ServiceName { get; set; }
  46. /// <summary>
  47. /// Gets or sets the type of the channel.
  48. /// </summary>
  49. /// <value>The type of the channel.</value>
  50. public ChannelType ChannelType { get; set; }
  51. /// <summary>
  52. /// Gets or sets the type.
  53. /// </summary>
  54. /// <value>The type.</value>
  55. public string Type { get; set; }
  56. /// <summary>
  57. /// Gets or sets the type of the media.
  58. /// </summary>
  59. /// <value>The type of the media.</value>
  60. public string MediaType { get; set; }
  61. /// <summary>
  62. /// Gets or sets the user data.
  63. /// </summary>
  64. /// <value>The user data.</value>
  65. public UserItemDataDto UserData { get; set; }
  66. /// <summary>
  67. /// Gets or sets the now playing program.
  68. /// </summary>
  69. /// <value>The now playing program.</value>
  70. public ProgramInfoDto CurrentProgram { get; set; }
  71. /// <summary>
  72. /// Gets or sets the primary image aspect ratio, after image enhancements.
  73. /// </summary>
  74. /// <value>The primary image aspect ratio.</value>
  75. public double? PrimaryImageAspectRatio { get; set; }
  76. /// <summary>
  77. /// Gets or sets the primary image aspect ratio, before image enhancements.
  78. /// </summary>
  79. /// <value>The original primary image aspect ratio.</value>
  80. public double? OriginalPrimaryImageAspectRatio { get; set; }
  81. /// <summary>
  82. /// Gets a value indicating whether this instance has primary image.
  83. /// </summary>
  84. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  85. [IgnoreDataMember]
  86. public bool HasPrimaryImage
  87. {
  88. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Primary); }
  89. }
  90. public ChannelInfoDto()
  91. {
  92. ImageTags = new Dictionary<ImageType, Guid>();
  93. }
  94. public event PropertyChangedEventHandler PropertyChanged;
  95. }
  96. }