ItemImageInfo.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using MediaBrowser.Model.Entities;
  2. using System;
  3. using System.Runtime.Serialization;
  4. namespace MediaBrowser.Controller.Entities
  5. {
  6. public class ItemImageInfo
  7. {
  8. /// <summary>
  9. /// Gets or sets the path.
  10. /// </summary>
  11. /// <value>The path.</value>
  12. public string Path { get; set; }
  13. /// <summary>
  14. /// Gets or sets the type.
  15. /// </summary>
  16. /// <value>The type.</value>
  17. public ImageType Type { get; set; }
  18. /// <summary>
  19. /// Gets or sets the date modified.
  20. /// </summary>
  21. /// <value>The date modified.</value>
  22. public DateTime DateModified { get; set; }
  23. /// <summary>
  24. /// Gets or sets a value indicating whether this instance is placeholder.
  25. /// </summary>
  26. /// <value><c>true</c> if this instance is placeholder; otherwise, <c>false</c>.</value>
  27. public bool IsPlaceholder { get; set; }
  28. [IgnoreDataMember]
  29. public bool IsLocalFile
  30. {
  31. get
  32. {
  33. if (Path != null)
  34. {
  35. if (Path.StartsWith("http", StringComparison.OrdinalIgnoreCase))
  36. {
  37. return false;
  38. }
  39. }
  40. return true;
  41. }
  42. }
  43. }
  44. }