ItemImageInfo.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #nullable disable
  2. #pragma warning disable CS1591
  3. using System;
  4. using System.Text.Json.Serialization;
  5. using MediaBrowser.Model.Entities;
  6. namespace MediaBrowser.Controller.Entities
  7. {
  8. public class ItemImageInfo
  9. {
  10. /// <summary>
  11. /// Gets or sets the path.
  12. /// </summary>
  13. /// <value>The path.</value>
  14. public string Path { get; set; }
  15. /// <summary>
  16. /// Gets or sets the type.
  17. /// </summary>
  18. /// <value>The type.</value>
  19. public ImageType Type { get; set; }
  20. /// <summary>
  21. /// Gets or sets the date modified.
  22. /// </summary>
  23. /// <value>The date modified.</value>
  24. public DateTime DateModified { get; set; }
  25. public int Width { get; set; }
  26. public int Height { get; set; }
  27. /// <summary>
  28. /// Gets or sets the blurhash.
  29. /// </summary>
  30. /// <value>The blurhash.</value>
  31. public string BlurHash { get; set; }
  32. [JsonIgnore]
  33. public bool IsLocalFile => Path == null || !Path.StartsWith("http", StringComparison.OrdinalIgnoreCase);
  34. }
  35. }