BaseItemInfo.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using System;
  2. using System.Runtime.Serialization;
  3. namespace MediaBrowser.Model.Entities
  4. {
  5. /// <summary>
  6. /// This is a stub class containing only basic information about an item
  7. /// </summary>
  8. public class BaseItemInfo
  9. {
  10. /// <summary>
  11. /// Gets or sets the name.
  12. /// </summary>
  13. /// <value>The name.</value>
  14. public string Name { get; set; }
  15. /// <summary>
  16. /// Gets or sets the id.
  17. /// </summary>
  18. /// <value>The id.</value>
  19. public string Id { get; set; }
  20. /// <summary>
  21. /// Gets or sets the type.
  22. /// </summary>
  23. /// <value>The type.</value>
  24. public string Type { get; set; }
  25. /// <summary>
  26. /// Gets or sets a value indicating whether this instance is folder.
  27. /// </summary>
  28. /// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value>
  29. public bool IsFolder { get; set; }
  30. /// <summary>
  31. /// Gets or sets the run time ticks.
  32. /// </summary>
  33. /// <value>The run time ticks.</value>
  34. public long? RunTimeTicks { get; set; }
  35. /// <summary>
  36. /// Gets or sets the primary image tag.
  37. /// </summary>
  38. /// <value>The primary image tag.</value>
  39. public Guid? PrimaryImageTag { get; set; }
  40. /// <summary>
  41. /// Gets or sets the backdrop image tag.
  42. /// </summary>
  43. /// <value>The backdrop image tag.</value>
  44. public Guid? BackdropImageTag { get; set; }
  45. /// <summary>
  46. /// Gets a value indicating whether this instance has primary image.
  47. /// </summary>
  48. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  49. [IgnoreDataMember]
  50. public bool HasPrimaryImage
  51. {
  52. get { return PrimaryImageTag.HasValue; }
  53. }
  54. /// <summary>
  55. /// Gets a value indicating whether this instance has backdrop.
  56. /// </summary>
  57. /// <value><c>true</c> if this instance has backdrop; otherwise, <c>false</c>.</value>
  58. [IgnoreDataMember]
  59. public bool HasBackdrop
  60. {
  61. get { return BackdropImageTag.HasValue; }
  62. }
  63. }
  64. }