update backdrops

This commit is contained in:
Luke Pulverenti 2016-12-02 15:45:11 -05:00
parent aef79a796d
commit 4a9c77c327
2 changed files with 10 additions and 11 deletions

View File

@ -149,6 +149,11 @@ namespace Emby.Server.Implementations.Images
var mimeType = MimeTypes.GetMimeType(outputPath);
if (string.Equals(mimeType, "application/octet-stream", StringComparison.OrdinalIgnoreCase))
{
mimeType = "image/png";
}
await ProviderManager.SaveImage(item, outputPath, mimeType, imageType, null, false, cancellationToken).ConfigureAwait(false);
return ItemUpdateType.ImageUpdate;

View File

@ -158,21 +158,15 @@ namespace Emby.Server.Implementations.UserViews
}
protected override async Task<string> CreateImage(IHasImages item, List<BaseItem> itemsWithImages, string outputPathWithoutExtension, ImageType imageType, int imageIndex)
{
var outputPath = Path.ChangeExtension(outputPathWithoutExtension, ".png");
var view = (UserView)item;
if (imageType == ImageType.Primary && IsUsingCollectionStrip(view))
{
if (itemsWithImages.Count == 0)
{
return null;
}
return await CreateThumbCollage(item, itemsWithImages, outputPath, 960, 540).ConfigureAwait(false);
}
var outputPath = Path.ChangeExtension(outputPathWithoutExtension, ".png");
return await base.CreateImage(item, itemsWithImages, outputPath, imageType, imageIndex).ConfigureAwait(false);
return await CreateThumbCollage(item, itemsWithImages, outputPath, 960, 540).ConfigureAwait(false);
}
}
}