Some code from before I left for holiday. Need to review it later.

This commit is contained in:
Joseph Milazzo 2025-06-01 07:02:27 -05:00
parent 28702e2d10
commit 3933d5cab2
3 changed files with 17 additions and 8 deletions

View file

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