From 52aeb3c40b3e2f0fdc377ac7c793714add2be0ef Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 7 Aug 2017 17:06:13 -0400 Subject: consolidate interfaces --- MediaBrowser.Controller/Drawing/IImageProcessor.cs | 8 +- MediaBrowser.Controller/Drawing/ImageHelper.cs | 2 +- .../Drawing/ImageProcessingOptions.cs | 2 +- .../Drawing/ImageProcessorExtensions.cs | 4 +- MediaBrowser.Controller/Dto/IDtoService.cs | 4 +- MediaBrowser.Controller/Entities/BaseItem.cs | 2 +- MediaBrowser.Controller/Entities/IHasImages.cs | 260 --------------------- MediaBrowser.Controller/Entities/IHasMetadata.cs | 253 +++++++++++++++++++- MediaBrowser.Controller/Library/ILibraryManager.cs | 2 +- MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs | 2 +- .../MediaBrowser.Controller.csproj | 1 - .../Providers/IDynamicImageProvider.cs | 4 +- .../Providers/IImageEnhancer.cs | 8 +- .../Providers/IImageProvider.cs | 2 +- .../Providers/ILocalImageFileProvider.cs | 2 +- .../Providers/IProviderManager.cs | 12 +- .../Providers/IRemoteImageProvider.cs | 4 +- 17 files changed, 281 insertions(+), 291 deletions(-) delete mode 100644 MediaBrowser.Controller/Entities/IHasImages.cs (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/Drawing/IImageProcessor.cs b/MediaBrowser.Controller/Drawing/IImageProcessor.cs index 2832462a8d..29363f4927 100644 --- a/MediaBrowser.Controller/Drawing/IImageProcessor.cs +++ b/MediaBrowser.Controller/Drawing/IImageProcessor.cs @@ -54,7 +54,7 @@ namespace MediaBrowser.Controller.Drawing /// The item. /// Type of the image. /// IEnumerable{IImageEnhancer}. - IEnumerable GetSupportedEnhancers(IHasImages item, ImageType imageType); + IEnumerable GetSupportedEnhancers(IHasMetadata item, ImageType imageType); /// /// Gets the image cache tag. @@ -62,7 +62,7 @@ namespace MediaBrowser.Controller.Drawing /// The item. /// The image. /// Guid. - string GetImageCacheTag(IHasImages item, ItemImageInfo image); + string GetImageCacheTag(IHasMetadata item, ItemImageInfo image); /// /// Gets the image cache tag. @@ -71,7 +71,7 @@ namespace MediaBrowser.Controller.Drawing /// The image. /// The image enhancers. /// Guid. - string GetImageCacheTag(IHasImages item, ItemImageInfo image, List imageEnhancers); + string GetImageCacheTag(IHasMetadata item, ItemImageInfo image, List imageEnhancers); /// /// Processes the image. @@ -95,7 +95,7 @@ namespace MediaBrowser.Controller.Drawing /// Type of the image. /// Index of the image. /// Task{System.String}. - Task GetEnhancedImage(IHasImages item, ImageType imageType, int imageIndex); + Task GetEnhancedImage(IHasMetadata item, ImageType imageType, int imageIndex); /// /// Gets the supported image output formats. diff --git a/MediaBrowser.Controller/Drawing/ImageHelper.cs b/MediaBrowser.Controller/Drawing/ImageHelper.cs index 54f2ff987a..9452446a14 100644 --- a/MediaBrowser.Controller/Drawing/ImageHelper.cs +++ b/MediaBrowser.Controller/Drawing/ImageHelper.cs @@ -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) { diff --git a/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs b/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs index cfb3a97eea..fac21c7445 100644 --- a/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs +++ b/MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs @@ -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; } diff --git a/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs b/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs index c5601c49f4..5dfa94e1ea 100644 --- a/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs +++ b/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs @@ -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); diff --git a/MediaBrowser.Controller/Dto/IDtoService.cs b/MediaBrowser.Controller/Dto/IDtoService.cs index a6f807ce9d..963092f522 100644 --- a/MediaBrowser.Controller/Dto/IDtoService.cs +++ b/MediaBrowser.Controller/Dto/IDtoService.cs @@ -24,14 +24,14 @@ namespace MediaBrowser.Controller.Dto /// /// The dto. /// The item. - void AttachPrimaryImageAspectRatio(IItemDto dto, IHasImages item); + void AttachPrimaryImageAspectRatio(IItemDto dto, IHasMetadata item); /// /// Gets the primary image aspect ratio. /// /// The item. /// System.Nullable<System.Double>. - double? GetPrimaryImageAspectRatio(IHasImages item); + double? GetPrimaryImageAspectRatio(IHasMetadata item); /// /// Gets the base item dto. diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index cb345439a5..7c375b9373 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -39,7 +39,7 @@ namespace MediaBrowser.Controller.Entities /// /// Class BaseItem /// - public abstract class BaseItem : IHasProviderIds, IHasImages, IHasUserData, IHasMetadata, IHasLookupInfo + public abstract class BaseItem : IHasMetadata, IHasLookupInfo { protected BaseItem() { diff --git a/MediaBrowser.Controller/Entities/IHasImages.cs b/MediaBrowser.Controller/Entities/IHasImages.cs deleted file mode 100644 index 6d56b1525f..0000000000 --- a/MediaBrowser.Controller/Entities/IHasImages.cs +++ /dev/null @@ -1,260 +0,0 @@ -using MediaBrowser.Controller.Providers; -using MediaBrowser.Model.Entities; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -using MediaBrowser.Controller.IO; -using MediaBrowser.Controller.Library; -using MediaBrowser.Model.IO; - -namespace MediaBrowser.Controller.Entities -{ - public interface IHasImages : IHasProviderIds, IHasUserData - { - /// - /// Gets the name. - /// - /// The name. - string Name { get; set; } - - /// - /// Gets the path. - /// - /// The path. - string Path { get; set; } - - /// - /// Gets the file name without extension. - /// - /// The file name without extension. - string FileNameWithoutExtension { get; } - - /// - /// Gets the type of the location. - /// - /// The type of the location. - LocationType LocationType { get; } - - /// - /// Gets the locked fields. - /// - /// The locked fields. - List LockedFields { get; } - - /// - /// Gets the images. - /// - /// Type of the image. - /// IEnumerable{ItemImageInfo}. - IEnumerable GetImages(ImageType imageType); - - /// - /// Gets the image path. - /// - /// Type of the image. - /// Index of the image. - /// System.String. - string GetImagePath(ImageType imageType, int imageIndex); - - /// - /// Gets the image information. - /// - /// Type of the image. - /// Index of the image. - /// ItemImageInfo. - ItemImageInfo GetImageInfo(ImageType imageType, int imageIndex); - - /// - /// Sets the image. - /// - /// The type. - /// The index. - /// The file. - void SetImagePath(ImageType type, int index, FileSystemMetadata file); - - /// - /// Determines whether the specified type has image. - /// - /// The type. - /// Index of the image. - /// true if the specified type has image; otherwise, false. - bool HasImage(ImageType type, int imageIndex); - - /// - /// Allowses the multiple images. - /// - /// The type. - /// true if XXXX, false otherwise. - bool AllowsMultipleImages(ImageType type); - - /// - /// Swaps the images. - /// - /// The type. - /// The index1. - /// The index2. - /// Task. - Task SwapImages(ImageType type, int index1, int index2); - - /// - /// Gets or sets the primary image path. - /// - /// The primary image path. - string PrimaryImagePath { get; } - - /// - /// Gets the preferred metadata language. - /// - /// System.String. - string GetPreferredMetadataLanguage(); - - /// - /// Validates the images and returns true or false indicating if any were removed. - /// - bool ValidateImages(IDirectoryService directoryService); - - /// - /// Gets a value indicating whether this instance is owned item. - /// - /// true if this instance is owned item; otherwise, false. - bool IsOwnedItem { get; } - - /// - /// Gets the containing folder path. - /// - /// The containing folder path. - string ContainingFolderPath { get; } - - /// - /// Adds the images. - /// - /// Type of the image. - /// The images. - /// true if XXXX, false otherwise. - bool AddImages(ImageType imageType, List images); - - /// - /// Determines whether [is save local metadata enabled]. - /// - /// true if [is save local metadata enabled]; otherwise, false. - bool IsSaveLocalMetadataEnabled(); - - /// - /// Gets a value indicating whether [supports local metadata]. - /// - /// true if [supports local metadata]; otherwise, false. - bool SupportsLocalMetadata { get; } - - bool IsInMixedFolder { get; } - - /// - /// Gets a value indicating whether this instance is locked. - /// - /// true if this instance is locked; otherwise, false. - bool IsLocked { get; } - - /// - /// Gets a value indicating whether [supports remote image downloading]. - /// - /// true if [supports remote image downloading]; otherwise, false. - bool SupportsRemoteImageDownloading { get; } - - /// - /// Gets the internal metadata path. - /// - /// System.String. - string GetInternalMetadataPath(); - - /// - /// Gets a value indicating whether [always scan internal metadata path]. - /// - /// true if [always scan internal metadata path]; otherwise, false. - bool AlwaysScanInternalMetadataPath { get; } - - /// - /// Determines whether [is internet metadata enabled]. - /// - /// true if [is internet metadata enabled]; otherwise, false. - bool IsInternetMetadataEnabled(); - - /// - /// Removes the image. - /// - /// The image. - void RemoveImage(ItemImageInfo image); - - /// - /// Updates to repository. - /// - /// The update reason. - /// The cancellation token. - /// Task. - Task UpdateToRepository(ItemUpdateType updateReason, CancellationToken cancellationToken); - - /// - /// Sets the image. - /// - /// The image. - /// The index. - void SetImage(ItemImageInfo image, int index); - - double? GetDefaultPrimaryImageAspectRatio(); - - int? ProductionYear { get; set; } - - List Tags { get; set; } - } - - public static class HasImagesExtensions - { - /// - /// Gets the image path. - /// - /// The item. - /// Type of the image. - /// System.String. - public static string GetImagePath(this IHasImages item, ImageType imageType) - { - return item.GetImagePath(imageType, 0); - } - - public static bool HasImage(this IHasImages item, ImageType imageType) - { - return item.HasImage(imageType, 0); - } - - /// - /// Sets the image path. - /// - /// The item. - /// Type of the image. - /// The file. - public static void SetImagePath(this IHasImages item, ImageType imageType, FileSystemMetadata file) - { - item.SetImagePath(imageType, 0, file); - } - - /// - /// Sets the image path. - /// - /// The item. - /// Type of the image. - /// The file. - public static void SetImagePath(this IHasImages item, ImageType imageType, string file) - { - if (file.StartsWith("http", System.StringComparison.OrdinalIgnoreCase)) - { - item.SetImage(new ItemImageInfo - { - Path = file, - Type = imageType - }, 0); - } - else - { - item.SetImagePath(imageType, BaseItem.FileSystem.GetFileInfo(file)); - } - } - } -} diff --git a/MediaBrowser.Controller/Entities/IHasMetadata.cs b/MediaBrowser.Controller/Entities/IHasMetadata.cs index 1d2e23a6cf..a76f2fec34 100644 --- a/MediaBrowser.Controller/Entities/IHasMetadata.cs +++ b/MediaBrowser.Controller/Entities/IHasMetadata.cs @@ -1,12 +1,18 @@ using System; using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using MediaBrowser.Controller.Library; +using MediaBrowser.Controller.Providers; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.IO; namespace MediaBrowser.Controller.Entities { /// /// Interface IHasMetadata /// - public interface IHasMetadata : IHasImages + public interface IHasMetadata : IHasProviderIds, IHasUserData { /// /// Gets the preferred metadata country code. @@ -65,5 +71,250 @@ namespace MediaBrowser.Controller.Entities int InheritedParentalRatingValue { get; set; } List GetInheritedTags(); long? RunTimeTicks { get; set; } + + /// + /// Gets the name. + /// + /// The name. + string Name { get; set; } + + /// + /// Gets the path. + /// + /// The path. + string Path { get; set; } + + /// + /// Gets the file name without extension. + /// + /// The file name without extension. + string FileNameWithoutExtension { get; } + + /// + /// Gets the type of the location. + /// + /// The type of the location. + LocationType LocationType { get; } + + /// + /// Gets the locked fields. + /// + /// The locked fields. + List LockedFields { get; } + + /// + /// Gets the images. + /// + /// Type of the image. + /// IEnumerable{ItemImageInfo}. + IEnumerable GetImages(ImageType imageType); + + /// + /// Gets the image path. + /// + /// Type of the image. + /// Index of the image. + /// System.String. + string GetImagePath(ImageType imageType, int imageIndex); + + /// + /// Gets the image information. + /// + /// Type of the image. + /// Index of the image. + /// ItemImageInfo. + ItemImageInfo GetImageInfo(ImageType imageType, int imageIndex); + + /// + /// Sets the image. + /// + /// The type. + /// The index. + /// The file. + void SetImagePath(ImageType type, int index, FileSystemMetadata file); + + /// + /// Determines whether the specified type has image. + /// + /// The type. + /// Index of the image. + /// true if the specified type has image; otherwise, false. + bool HasImage(ImageType type, int imageIndex); + + /// + /// Allowses the multiple images. + /// + /// The type. + /// true if XXXX, false otherwise. + bool AllowsMultipleImages(ImageType type); + + /// + /// Swaps the images. + /// + /// The type. + /// The index1. + /// The index2. + /// Task. + Task SwapImages(ImageType type, int index1, int index2); + + /// + /// Gets or sets the primary image path. + /// + /// The primary image path. + string PrimaryImagePath { get; } + + /// + /// Gets the preferred metadata language. + /// + /// System.String. + string GetPreferredMetadataLanguage(); + + /// + /// Validates the images and returns true or false indicating if any were removed. + /// + bool ValidateImages(IDirectoryService directoryService); + + /// + /// Gets a value indicating whether this instance is owned item. + /// + /// true if this instance is owned item; otherwise, false. + bool IsOwnedItem { get; } + + /// + /// Gets the containing folder path. + /// + /// The containing folder path. + string ContainingFolderPath { get; } + + /// + /// Adds the images. + /// + /// Type of the image. + /// The images. + /// true if XXXX, false otherwise. + bool AddImages(ImageType imageType, List images); + + /// + /// Determines whether [is save local metadata enabled]. + /// + /// true if [is save local metadata enabled]; otherwise, false. + bool IsSaveLocalMetadataEnabled(); + + /// + /// Gets a value indicating whether [supports local metadata]. + /// + /// true if [supports local metadata]; otherwise, false. + bool SupportsLocalMetadata { get; } + + bool IsInMixedFolder { get; } + + /// + /// Gets a value indicating whether this instance is locked. + /// + /// true if this instance is locked; otherwise, false. + bool IsLocked { get; } + + /// + /// Gets a value indicating whether [supports remote image downloading]. + /// + /// true if [supports remote image downloading]; otherwise, false. + bool SupportsRemoteImageDownloading { get; } + + /// + /// Gets the internal metadata path. + /// + /// System.String. + string GetInternalMetadataPath(); + + /// + /// Gets a value indicating whether [always scan internal metadata path]. + /// + /// true if [always scan internal metadata path]; otherwise, false. + bool AlwaysScanInternalMetadataPath { get; } + + /// + /// Determines whether [is internet metadata enabled]. + /// + /// true if [is internet metadata enabled]; otherwise, false. + bool IsInternetMetadataEnabled(); + + /// + /// Removes the image. + /// + /// The image. + void RemoveImage(ItemImageInfo image); + + /// + /// Updates to repository. + /// + /// The update reason. + /// The cancellation token. + /// Task. + Task UpdateToRepository(ItemUpdateType updateReason, CancellationToken cancellationToken); + + /// + /// Sets the image. + /// + /// The image. + /// The index. + void SetImage(ItemImageInfo image, int index); + + double? GetDefaultPrimaryImageAspectRatio(); + + int? ProductionYear { get; set; } + + List Tags { get; set; } + } + + public static class HasMetadataExtensions + { + /// + /// Gets the image path. + /// + /// The item. + /// Type of the image. + /// System.String. + public static string GetImagePath(this IHasMetadata item, ImageType imageType) + { + return item.GetImagePath(imageType, 0); + } + + public static bool HasImage(this IHasMetadata item, ImageType imageType) + { + return item.HasImage(imageType, 0); + } + + /// + /// Sets the image path. + /// + /// The item. + /// Type of the image. + /// The file. + public static void SetImagePath(this IHasMetadata item, ImageType imageType, FileSystemMetadata file) + { + item.SetImagePath(imageType, 0, file); + } + + /// + /// Sets the image path. + /// + /// The item. + /// Type of the image. + /// The file. + public static void SetImagePath(this IHasMetadata item, ImageType imageType, string file) + { + if (file.StartsWith("http", System.StringComparison.OrdinalIgnoreCase)) + { + item.SetImage(new ItemImageInfo + { + Path = file, + Type = imageType + }, 0); + } + else + { + item.SetImagePath(imageType, BaseItem.FileSystem.GetFileInfo(file)); + } + } } } diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index b726c267c6..bf2ebac841 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -520,7 +520,7 @@ namespace MediaBrowser.Controller.Library /// The image. /// Index of the image. /// Task. - Task ConvertImageToLocal(IHasImages item, ItemImageInfo image, int imageIndex); + Task ConvertImageToLocal(IHasMetadata item, ItemImageInfo image, int imageIndex); /// /// Gets the items. diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs b/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs index 1bbd1a0082..27ff334ee2 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvRecording.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; namespace MediaBrowser.Controller.LiveTv { - public interface ILiveTvRecording : IHasImages, IHasMediaSources, IHasUserData, IHasStartDate, IHasProgramAttributes + public interface ILiveTvRecording : IHasMetadata, IHasMediaSources, IHasUserData, IHasStartDate, IHasProgramAttributes { string ServiceName { get; set; } string ExternalId { get; set; } diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index e5fbf599a0..b72b9027ec 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -99,7 +99,6 @@ - diff --git a/MediaBrowser.Controller/Providers/IDynamicImageProvider.cs b/MediaBrowser.Controller/Providers/IDynamicImageProvider.cs index 9c3f947637..e96a2d65e8 100644 --- a/MediaBrowser.Controller/Providers/IDynamicImageProvider.cs +++ b/MediaBrowser.Controller/Providers/IDynamicImageProvider.cs @@ -13,7 +13,7 @@ namespace MediaBrowser.Controller.Providers /// /// The item. /// IEnumerable{ImageType}. - IEnumerable GetSupportedImages(IHasImages item); + IEnumerable GetSupportedImages(IHasMetadata item); /// /// Gets the image. @@ -22,6 +22,6 @@ namespace MediaBrowser.Controller.Providers /// The type. /// The cancellation token. /// Task{DynamicImageResponse}. - Task GetImage(IHasImages item, ImageType type, CancellationToken cancellationToken); + Task GetImage(IHasMetadata item, ImageType type, CancellationToken cancellationToken); } } \ No newline at end of file diff --git a/MediaBrowser.Controller/Providers/IImageEnhancer.cs b/MediaBrowser.Controller/Providers/IImageEnhancer.cs index a43941607e..a993f536d9 100644 --- a/MediaBrowser.Controller/Providers/IImageEnhancer.cs +++ b/MediaBrowser.Controller/Providers/IImageEnhancer.cs @@ -13,7 +13,7 @@ namespace MediaBrowser.Controller.Providers /// The item. /// Type of the image. /// true if this enhancer will enhance the supplied image for the supplied item, false otherwise - bool Supports(IHasImages item, ImageType imageType); + bool Supports(IHasMetadata item, ImageType imageType); /// /// Gets the priority or order in which this enhancer should be run. @@ -27,7 +27,7 @@ namespace MediaBrowser.Controller.Providers /// The item. /// Type of the image. /// Cache key relating to the current state of this item and configuration - string GetConfigurationCacheKey(IHasImages item, ImageType imageType); + string GetConfigurationCacheKey(IHasMetadata item, ImageType imageType); /// /// Gets the size of the enhanced image. @@ -37,7 +37,7 @@ namespace MediaBrowser.Controller.Providers /// Index of the image. /// Size of the original image. /// ImageSize. - ImageSize GetEnhancedImageSize(IHasImages item, ImageType imageType, int imageIndex, ImageSize originalImageSize); + ImageSize GetEnhancedImageSize(IHasMetadata item, ImageType imageType, int imageIndex, ImageSize originalImageSize); /// /// Enhances the image async. @@ -49,6 +49,6 @@ namespace MediaBrowser.Controller.Providers /// Index of the image. /// Task{Image}. /// - Task EnhanceImageAsync(IHasImages item, string inputFile, string outputFile, ImageType imageType, int imageIndex); + Task EnhanceImageAsync(IHasMetadata item, string inputFile, string outputFile, ImageType imageType, int imageIndex); } } \ No newline at end of file diff --git a/MediaBrowser.Controller/Providers/IImageProvider.cs b/MediaBrowser.Controller/Providers/IImageProvider.cs index 1e5bdfeafc..2b43c9cb8f 100644 --- a/MediaBrowser.Controller/Providers/IImageProvider.cs +++ b/MediaBrowser.Controller/Providers/IImageProvider.cs @@ -18,6 +18,6 @@ namespace MediaBrowser.Controller.Providers /// /// The item. /// true if XXXX, false otherwise - bool Supports(IHasImages item); + bool Supports(IHasMetadata item); } } diff --git a/MediaBrowser.Controller/Providers/ILocalImageFileProvider.cs b/MediaBrowser.Controller/Providers/ILocalImageFileProvider.cs index 7e5d828437..e93c73a523 100644 --- a/MediaBrowser.Controller/Providers/ILocalImageFileProvider.cs +++ b/MediaBrowser.Controller/Providers/ILocalImageFileProvider.cs @@ -5,6 +5,6 @@ namespace MediaBrowser.Controller.Providers { public interface ILocalImageFileProvider : ILocalImageProvider { - List GetImages(IHasImages item, IDirectoryService directoryService); + List GetImages(IHasMetadata item, IDirectoryService directoryService); } } \ No newline at end of file diff --git a/MediaBrowser.Controller/Providers/IProviderManager.cs b/MediaBrowser.Controller/Providers/IProviderManager.cs index 0ba573da8b..703666d668 100644 --- a/MediaBrowser.Controller/Providers/IProviderManager.cs +++ b/MediaBrowser.Controller/Providers/IProviderManager.cs @@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.Providers /// Index of the image. /// The cancellation token. /// Task. - Task SaveImage(IHasImages item, string url, ImageType type, int? imageIndex, CancellationToken cancellationToken); + Task SaveImage(IHasMetadata item, string url, ImageType type, int? imageIndex, CancellationToken cancellationToken); /// /// Saves the image. @@ -62,13 +62,13 @@ namespace MediaBrowser.Controller.Providers /// Index of the image. /// The cancellation token. /// Task. - Task SaveImage(IHasImages item, Stream source, string mimeType, ImageType type, int? imageIndex, CancellationToken cancellationToken); + Task SaveImage(IHasMetadata item, Stream source, string mimeType, ImageType type, int? imageIndex, CancellationToken cancellationToken); /// /// Saves the image. /// /// Task. - Task SaveImage(IHasImages item, string source, string mimeType, ImageType type, int? imageIndex, bool? saveLocallyWithMedia, CancellationToken cancellationToken); + Task SaveImage(IHasMetadata item, string source, string mimeType, ImageType type, int? imageIndex, bool? saveLocallyWithMedia, CancellationToken cancellationToken); /// /// Adds the metadata providers. @@ -84,14 +84,14 @@ namespace MediaBrowser.Controller.Providers /// The query. /// The cancellation token. /// Task{IEnumerable{RemoteImageInfo}}. - Task> GetAvailableRemoteImages(IHasImages item, RemoteImageQuery query, CancellationToken cancellationToken); + Task> GetAvailableRemoteImages(IHasMetadata item, RemoteImageQuery query, CancellationToken cancellationToken); /// /// Gets the image providers. /// /// The item. /// IEnumerable{ImageProviderInfo}. - IEnumerable GetRemoteImageProviderInfo(IHasImages item); + IEnumerable GetRemoteImageProviderInfo(IHasMetadata item); /// /// Gets all metadata plugins. @@ -135,7 +135,7 @@ namespace MediaBrowser.Controller.Providers /// /// The item. /// MetadataOptions. - MetadataOptions GetMetadataOptions(IHasImages item); + MetadataOptions GetMetadataOptions(IHasMetadata item); /// /// Gets the remote search results. diff --git a/MediaBrowser.Controller/Providers/IRemoteImageProvider.cs b/MediaBrowser.Controller/Providers/IRemoteImageProvider.cs index 6b94547bba..86a7939e60 100644 --- a/MediaBrowser.Controller/Providers/IRemoteImageProvider.cs +++ b/MediaBrowser.Controller/Providers/IRemoteImageProvider.cs @@ -18,7 +18,7 @@ namespace MediaBrowser.Controller.Providers /// /// The item. /// IEnumerable{ImageType}. - IEnumerable GetSupportedImages(IHasImages item); + IEnumerable GetSupportedImages(IHasMetadata item); /// /// Gets the images. @@ -26,7 +26,7 @@ namespace MediaBrowser.Controller.Providers /// The item. /// The cancellation token. /// Task{IEnumerable{RemoteImageInfo}}. - Task> GetImages(IHasImages item, CancellationToken cancellationToken); + Task> GetImages(IHasMetadata item, CancellationToken cancellationToken); /// /// Gets the image response. -- cgit v1.2.3