mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04: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);
|
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);
|
await ProviderManager.SaveImage(item, outputPath, mimeType, imageType, null, false, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
return ItemUpdateType.ImageUpdate;
|
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)
|
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 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…
x
Reference in New Issue
Block a user