update backdrops

pull/702/head
Luke Pulverenti 8 years ago
parent aef79a796d
commit 4a9c77c327

@ -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;

@ -159,20 +159,14 @@ 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)
{
if (itemsWithImages.Count == 0)
{
return null;
}
return await CreateThumbCollage(item, itemsWithImages, outputPath, 960, 540).ConfigureAwait(false);
return null;
}
return await base.CreateImage(item, itemsWithImages, outputPath, imageType, imageIndex).ConfigureAwait(false);
var outputPath = Path.ChangeExtension(outputPathWithoutExtension, ".png");
return await CreateThumbCollage(item, itemsWithImages, outputPath, 960, 540).ConfigureAwait(false);
}
}
}

Loading…
Cancel
Save