jellyfin-server/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs

26 lines
763 B
C#
Raw Normal View History

using MediaBrowser.Controller.Entities;
2018-12-27 23:27:57 +00: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 23:27:46 +00:00
2018-12-27 23:27:57 +00: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);
}
}
}