コード例 #1
0
ファイル: ImageSaver.cs プロジェクト: ErniepDev/MediaBrowser
 /// <summary>
 /// Gets the current image path.
 /// </summary>
 /// <param name="item">The item.</param>
 /// <param name="type">The type.</param>
 /// <param name="imageIndex">Index of the image.</param>
 /// <returns>System.String.</returns>
 /// <exception cref="System.ArgumentNullException">
 /// imageIndex
 /// or
 /// imageIndex
 /// </exception>
 private string GetCurrentImagePath(IHasImages item, ImageType type, int imageIndex)
 {
     return(item.GetImagePath(type, imageIndex));
 }
コード例 #2
0
ファイル: ImageSaver.cs プロジェクト: jabbera/MediaBrowser
 /// <summary>
 /// Gets the current image path.
 /// </summary>
 /// <param name="item">The item.</param>
 /// <param name="type">The type.</param>
 /// <param name="imageIndex">Index of the image.</param>
 /// <returns>System.String.</returns>
 /// <exception cref="System.ArgumentNullException">
 /// imageIndex
 /// or
 /// imageIndex
 /// </exception>
 private string GetCurrentImagePath(IHasImages item, ImageType type, int imageIndex)
 {
     return item.GetImagePath(type, imageIndex);
 }
コード例 #3
0
 /// <summary>
 /// Gets the image path.
 /// </summary>
 /// <param name="item">The item.</param>
 /// <param name="imageType">Type of the image.</param>
 /// <returns>System.String.</returns>
 public static string GetImagePath(this IHasImages item, ImageType imageType)
 {
     return(item.GetImagePath(imageType, 0));
 }
コード例 #4
0
        /// <summary>
        /// Gets the enhanced image.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <param name="imageType">Type of the image.</param>
        /// <param name="imageIndex">Index of the image.</param>
        /// <returns>Task{System.String}.</returns>
        public async Task<string> GetEnhancedImage(IHasImages item, ImageType imageType, int imageIndex)
        {
            var enhancers = GetSupportedEnhancers(item, imageType).ToList();

            var imagePath = item.GetImagePath(imageType, imageIndex);

            var dateModified = item.GetImageDateModified(imagePath);

            var result = await GetEnhancedImage(imagePath, dateModified, item, imageType, imageIndex, enhancers);

            return result.Item1;
        }