SeriesTimerInfoDto.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using MediaBrowser.Model.Entities;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Diagnostics;
  5. using System.Runtime.Serialization;
  6. namespace MediaBrowser.Model.LiveTv
  7. {
  8. [DebuggerDisplay("Name = {Name}")]
  9. public class SeriesTimerInfoDto : BaseTimerInfoDto
  10. {
  11. /// <summary>
  12. /// Gets or sets a value indicating whether [record any time].
  13. /// </summary>
  14. /// <value><c>true</c> if [record any time]; otherwise, <c>false</c>.</value>
  15. public bool RecordAnyTime { get; set; }
  16. /// <summary>
  17. /// Gets or sets a value indicating whether [record any channel].
  18. /// </summary>
  19. /// <value><c>true</c> if [record any channel]; otherwise, <c>false</c>.</value>
  20. public bool RecordAnyChannel { get; set; }
  21. /// <summary>
  22. /// Gets or sets a value indicating whether [record new only].
  23. /// </summary>
  24. /// <value><c>true</c> if [record new only]; otherwise, <c>false</c>.</value>
  25. public bool RecordNewOnly { get; set; }
  26. /// <summary>
  27. /// Gets or sets the days.
  28. /// </summary>
  29. /// <value>The days.</value>
  30. public List<DayOfWeek> Days { get; set; }
  31. /// <summary>
  32. /// Gets or sets the day pattern.
  33. /// </summary>
  34. /// <value>The day pattern.</value>
  35. public DayPattern? DayPattern { get; set; }
  36. /// <summary>
  37. /// Gets or sets the image tags.
  38. /// </summary>
  39. /// <value>The image tags.</value>
  40. public Dictionary<ImageType, string> ImageTags { get; set; }
  41. /// <summary>
  42. /// Gets a value indicating whether this instance has primary image.
  43. /// </summary>
  44. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  45. [IgnoreDataMember]
  46. public bool HasPrimaryImage
  47. {
  48. get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Primary); }
  49. }
  50. public SeriesTimerInfoDto()
  51. {
  52. ImageTags = new Dictionary<ImageType, string>();
  53. Days = new List<DayOfWeek>();
  54. }
  55. }
  56. }