Some cleanup. There is a bug around cover image not working for chapter image due to overwriting current and not using a temp image.

This commit is contained in:
Joseph Milazzo 2025-05-01 06:27:01 -05:00
parent 01f9cea86f
commit eb1a524b2f
6 changed files with 47 additions and 18 deletions

View file

@ -308,6 +308,7 @@ public class CoverDbService : ICoverDbService
.AllowHttpStatus("2xx,304")
.GetStreamAsync();
using var image = Image.NewFromStream(personStream);
switch (encodeFormat)
{
@ -553,6 +554,7 @@ public class CoverDbService : ICoverDbService
{
try
{
// BUG: There might be a bug here where it's comparing the same 2 images
var betterImage = Path.Join(_directoryService.CoverImageDirectory, series.CoverImage)
.GetBetterImage(Path.Join(_directoryService.CoverImageDirectory, filePath))!;
filePath = Path.GetFileName(betterImage);