reduce chapter db calls

This commit is contained in:
Luke Pulverenti
2013-06-18 15:43:14 -04:00
parent 5d8ed2c16f
commit 35af13fdc7
3 changed files with 8 additions and 6 deletions

View File

@@ -96,6 +96,7 @@ namespace MediaBrowser.Controller.Drawing
/// <param name="entity">The entity that owns the image</param>
/// <param name="imageType">The image type</param>
/// <param name="imageIndex">The image index (currently only used with backdrops)</param>
/// <param name="originalImagePath">The original image path.</param>
/// <param name="cropWhitespace">if set to <c>true</c> [crop whitespace].</param>
/// <param name="dateModified">The last date modified of the original image file</param>
/// <param name="toStream">The stream to save the new image to</param>
@@ -107,7 +108,7 @@ namespace MediaBrowser.Controller.Drawing
/// <param name="enhancers">The enhancers.</param>
/// <returns>Task.</returns>
/// <exception cref="System.ArgumentNullException">entity</exception>
public async Task ProcessImage(BaseItem entity, ImageType imageType, int imageIndex, bool cropWhitespace, DateTime dateModified, Stream toStream, int? width, int? height, int? maxWidth, int? maxHeight, int? quality, List<IImageEnhancer> enhancers)
public async Task ProcessImage(BaseItem entity, ImageType imageType, int imageIndex, string originalImagePath, bool cropWhitespace, DateTime dateModified, Stream toStream, int? width, int? height, int? maxWidth, int? maxHeight, int? quality, List<IImageEnhancer> enhancers)
{
if (entity == null)
{
@@ -119,8 +120,6 @@ namespace MediaBrowser.Controller.Drawing
throw new ArgumentNullException("toStream");
}
var originalImagePath = GetImagePath(entity, imageType, imageIndex);
if (cropWhitespace)
{
originalImagePath = await GetCroppedImage(originalImagePath, dateModified).ConfigureAwait(false);