diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-05-11 19:02:28 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-05-11 19:02:28 -0400 |
| commit | b9b568de13d81f9db1a8502d50940475c1d79c72 (patch) | |
| tree | a808b700095f876e437b95c432c0220e241f9fda /MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs | |
| parent | 0d605b8672ece5129e833a2e9cde11a8aaf1b62a (diff) | |
updated nuget
Diffstat (limited to 'MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs')
| -rw-r--r-- | MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs b/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs new file mode 100644 index 000000000..c5601c49f --- /dev/null +++ b/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs @@ -0,0 +1,25 @@ +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); + } + } +}
\ No newline at end of file |
