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