diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-02-07 15:30:41 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-02-07 15:30:41 -0500 |
| commit | 76658f07977a5857c752dc1266b66f881b454f48 (patch) | |
| tree | 34a55486343c34fedc03099891a2e2eb8690dc02 /MediaBrowser.Controller/Entities/IHasImages.cs | |
| parent | 5e2a2a02ef73517f11ef9c7a513ac53ed0f9b2e8 (diff) | |
create images list object
Diffstat (limited to 'MediaBrowser.Controller/Entities/IHasImages.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/IHasImages.cs | 50 |
1 files changed, 34 insertions, 16 deletions
diff --git a/MediaBrowser.Controller/Entities/IHasImages.cs b/MediaBrowser.Controller/Entities/IHasImages.cs index dd6194bc78..d260950bd2 100644 --- a/MediaBrowser.Controller/Entities/IHasImages.cs +++ b/MediaBrowser.Controller/Entities/IHasImages.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Model.Entities; +using System.IO; +using MediaBrowser.Model.Entities; using System; using System.Collections.Generic; using System.Threading.Tasks; @@ -32,6 +33,13 @@ namespace MediaBrowser.Controller.Entities LocationType LocationType { get; } /// <summary> + /// Gets the images. + /// </summary> + /// <param name="imageType">Type of the image.</param> + /// <returns>IEnumerable{ItemImageInfo}.</returns> + IEnumerable<ItemImageInfo> GetImages(ImageType imageType); + + /// <summary> /// Gets the image path. /// </summary> /// <param name="imageType">Type of the image.</param> @@ -40,19 +48,20 @@ namespace MediaBrowser.Controller.Entities string GetImagePath(ImageType imageType, int imageIndex); /// <summary> - /// Gets the image date modified. + /// Gets the image information. /// </summary> - /// <param name="imagePath">The image path.</param> - /// <returns>DateTime.</returns> - DateTime GetImageDateModified(string imagePath); + /// <param name="imageType">Type of the image.</param> + /// <param name="imageIndex">Index of the image.</param> + /// <returns>ItemImageInfo.</returns> + ItemImageInfo GetImageInfo(ImageType imageType, int imageIndex); /// <summary> /// Sets the image. /// </summary> /// <param name="type">The type.</param> /// <param name="index">The index.</param> - /// <param name="path">The path.</param> - void SetImagePath(ImageType type, int index, string path); + /// <param name="file">The file.</param> + void SetImagePath(ImageType type, int index, FileInfo file); /// <summary> /// Determines whether the specified type has image. @@ -63,6 +72,13 @@ namespace MediaBrowser.Controller.Entities bool HasImage(ImageType type, int imageIndex); /// <summary> + /// Allowses the multiple images. + /// </summary> + /// <param name="type">The type.</param> + /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns> + bool AllowsMultipleImages(ImageType type); + + /// <summary> /// Swaps the images. /// </summary> /// <param name="type">The type.</param> @@ -95,12 +111,6 @@ namespace MediaBrowser.Controller.Entities bool ValidateImages(); /// <summary> - /// Gets or sets the backdrop image paths. - /// </summary> - /// <value>The backdrop image paths.</value> - List<string> BackdropImagePaths { get; set; } - - /// <summary> /// Gets a value indicating whether this instance is owned item. /// </summary> /// <value><c>true</c> if this instance is owned item; otherwise, <c>false</c>.</value> @@ -111,6 +121,14 @@ namespace MediaBrowser.Controller.Entities /// </summary> /// <value>The containing folder path.</value> string ContainingFolderPath { get; } + + /// <summary> + /// Adds the images. + /// </summary> + /// <param name="imageType">Type of the image.</param> + /// <param name="images">The images.</param> + /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns> + bool AddImages(ImageType imageType, IEnumerable<FileInfo> images); } public static class HasImagesExtensions @@ -136,10 +154,10 @@ namespace MediaBrowser.Controller.Entities /// </summary> /// <param name="item">The item.</param> /// <param name="imageType">Type of the image.</param> - /// <param name="path">The path.</param> - public static void SetImagePath(this IHasImages item, ImageType imageType, string path) + /// <param name="file">The file.</param> + public static void SetImagePath(this IHasImages item, ImageType imageType, FileInfo file) { - item.SetImagePath(imageType, 0, path); + item.SetImagePath(imageType, 0, file); } } } |
