2014-05-11 16:02:28 -07:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Drawing
|
|
|
|
|
{
|
|
|
|
|
public static class ImageProcessorExtensions
|
|
|
|
|
{
|
2017-08-07 14:06:13 -07:00
|
|
|
|
public static string GetImageCacheTag(this IImageProcessor processor, IHasMetadata item, ImageType imageType)
|
2014-05-11 16:02:28 -07:00
|
|
|
|
{
|
|
|
|
|
return processor.GetImageCacheTag(item, imageType, 0);
|
|
|
|
|
}
|
|
|
|
|
|
2017-08-07 14:06:13 -07:00
|
|
|
|
public static string GetImageCacheTag(this IImageProcessor processor, IHasMetadata item, ImageType imageType, int imageIndex)
|
2014-05-11 16:02:28 -07:00
|
|
|
|
{
|
|
|
|
|
var imageInfo = item.GetImageInfo(imageType, imageIndex);
|
|
|
|
|
|
|
|
|
|
if (imageInfo == null)
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return processor.GetImageCacheTag(item, imageInfo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|