mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 17:44:43 +01:00
consolidate interfaces
This commit is contained in:
@@ -54,7 +54,7 @@ namespace MediaBrowser.Controller.Drawing
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="imageType">Type of the image.</param>
|
||||
/// <returns>IEnumerable{IImageEnhancer}.</returns>
|
||||
IEnumerable<IImageEnhancer> GetSupportedEnhancers(IHasImages item, ImageType imageType);
|
||||
IEnumerable<IImageEnhancer> GetSupportedEnhancers(IHasMetadata item, ImageType imageType);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the image cache tag.
|
||||
@@ -62,7 +62,7 @@ namespace MediaBrowser.Controller.Drawing
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="image">The image.</param>
|
||||
/// <returns>Guid.</returns>
|
||||
string GetImageCacheTag(IHasImages item, ItemImageInfo image);
|
||||
string GetImageCacheTag(IHasMetadata item, ItemImageInfo image);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the image cache tag.
|
||||
@@ -71,7 +71,7 @@ namespace MediaBrowser.Controller.Drawing
|
||||
/// <param name="image">The image.</param>
|
||||
/// <param name="imageEnhancers">The image enhancers.</param>
|
||||
/// <returns>Guid.</returns>
|
||||
string GetImageCacheTag(IHasImages item, ItemImageInfo image, List<IImageEnhancer> imageEnhancers);
|
||||
string GetImageCacheTag(IHasMetadata item, ItemImageInfo image, List<IImageEnhancer> imageEnhancers);
|
||||
|
||||
/// <summary>
|
||||
/// Processes the image.
|
||||
@@ -95,7 +95,7 @@ namespace MediaBrowser.Controller.Drawing
|
||||
/// <param name="imageType">Type of the image.</param>
|
||||
/// <param name="imageIndex">Index of the image.</param>
|
||||
/// <returns>Task{System.String}.</returns>
|
||||
Task<string> GetEnhancedImage(IHasImages item, ImageType imageType, int imageIndex);
|
||||
Task<string> GetEnhancedImage(IHasMetadata item, ImageType imageType, int imageIndex);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the supported image output formats.
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace MediaBrowser.Controller.Drawing
|
||||
return new ImageSize(widthValue, height);
|
||||
}
|
||||
|
||||
private static double GetEstimatedAspectRatio(ImageType type, IHasImages item)
|
||||
private static double GetEstimatedAspectRatio(ImageType type, IHasMetadata item)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace MediaBrowser.Controller.Drawing
|
||||
{
|
||||
public string ItemId { get; set; }
|
||||
public string ItemType { get; set; }
|
||||
public IHasImages Item { get; set; }
|
||||
public IHasMetadata Item { get; set; }
|
||||
|
||||
public ItemImageInfo Image { get; set; }
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ namespace MediaBrowser.Controller.Drawing
|
||||
{
|
||||
public static class ImageProcessorExtensions
|
||||
{
|
||||
public static string GetImageCacheTag(this IImageProcessor processor, IHasImages item, ImageType imageType)
|
||||
public static string GetImageCacheTag(this IImageProcessor processor, IHasMetadata item, ImageType imageType)
|
||||
{
|
||||
return processor.GetImageCacheTag(item, imageType, 0);
|
||||
}
|
||||
|
||||
public static string GetImageCacheTag(this IImageProcessor processor, IHasImages item, ImageType imageType, int imageIndex)
|
||||
public static string GetImageCacheTag(this IImageProcessor processor, IHasMetadata item, ImageType imageType, int imageIndex)
|
||||
{
|
||||
var imageInfo = item.GetImageInfo(imageType, imageIndex);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user