mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-05-31 20:24:27 -04:00
Fix first chapter in a series not having a cover when K+ replaces series cover
This commit is contained in:
parent
8ed2fa3829
commit
d9ac52aa0f
@ -572,7 +572,13 @@ public class CoverDbService : ICoverDbService
|
|||||||
var choseNewImage = string.Equals(betterImage, tempFullPath, StringComparison.OrdinalIgnoreCase);
|
var choseNewImage = string.Equals(betterImage, tempFullPath, StringComparison.OrdinalIgnoreCase);
|
||||||
if (choseNewImage)
|
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);
|
_directoryService.CopyFile(tempFullPath, finalFullPath);
|
||||||
series.CoverImage = finalFileName;
|
series.CoverImage = finalFileName;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user