Merge branch 'develop' into feature/reading-profiles

This commit is contained in:
Amelia 2025-05-30 09:43:52 +02:00
commit 899ffb96d1
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
3 changed files with 10 additions and 4 deletions

View file

@ -572,7 +572,13 @@ public class CoverDbService : ICoverDbService
var choseNewImage = string.Equals(betterImage, tempFullPath, StringComparison.OrdinalIgnoreCase);
if (choseNewImage)
{
_directoryService.DeleteFiles([existingPath]);
// Don't delete series cover, unless it's an override, otherwise the first chapter cover will be null
if (existingPath.Contains(ImageService.GetSeriesFormat(series.Id)))
{
_directoryService.DeleteFiles([existingPath]);
}
_directoryService.CopyFile(tempFullPath, finalFullPath);
series.CoverImage = finalFileName;
}