mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-08 20:38:24 +02:00
25 lines
777 B
C#
25 lines
777 B
C#
|
using MediaBrowser.Controller.Entities;
|
|||
|
using MediaBrowser.Model.Entities;
|
|||
|
|
|||
|
namespace MediaBrowser.Controller.Drawing
|
|||
|
{
|
|||
|
public static class ImageProcessorExtensions
|
|||
|
{
|
|||
|
public static string GetImageCacheTag(this IImageProcessor processor, IHasImages item, ImageType imageType)
|
|||
|
{
|
|||
|
return processor.GetImageCacheTag(item, imageType, 0);
|
|||
|
}
|
|||
|
|
|||
|
public static string GetImageCacheTag(this IImageProcessor processor, IHasImages item, ImageType imageType, int imageIndex)
|
|||
|
{
|
|||
|
var imageInfo = item.GetImageInfo(imageType, imageIndex);
|
|||
|
|
|||
|
if (imageInfo == null)
|
|||
|
{
|
|||
|
return null;
|
|||
|
}
|
|||
|
|
|||
|
return processor.GetImageCacheTag(item, imageInfo);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|