mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
update backdrops
This commit is contained in:
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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user