2020-08-22 19:56:24 +00:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2019-01-13 20:01:16 +00:00
|
|
|
using MediaBrowser.Controller.Entities;
|
2018-12-27 23:27:57 +00:00
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Drawing
|
|
|
|
{
|
|
|
|
public static class ImageProcessorExtensions
|
|
|
|
{
|
2023-07-29 19:35:38 +00:00
|
|
|
public static string? GetImageCacheTag(this IImageProcessor processor, BaseItem item, ImageType imageType)
|
2018-12-27 23:27:57 +00:00
|
|
|
{
|
|
|
|
return processor.GetImageCacheTag(item, imageType, 0);
|
|
|
|
}
|
2019-01-07 23:27:46 +00:00
|
|
|
|
2023-07-29 19:35:38 +00:00
|
|
|
public static string? GetImageCacheTag(this IImageProcessor processor, BaseItem item, ImageType imageType, int imageIndex)
|
2018-12-27 23:27:57 +00:00
|
|
|
{
|
|
|
|
var imageInfo = item.GetImageInfo(imageType, imageIndex);
|
|
|
|
|
2022-12-05 14:00:20 +00:00
|
|
|
if (imageInfo is null)
|
2018-12-27 23:27:57 +00:00
|
|
|
{
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return processor.GetImageCacheTag(item, imageInfo);
|
|
|
|
}
|
|
|
|
}
|
2019-01-13 19:30:58 +00:00
|
|
|
}
|