Implemented ability to generate Series summary from ComicInfo.xml (if present)
This commit is contained in:
parent
5be01b529b
commit
265f7dcc8c
4 changed files with 62 additions and 3 deletions
|
|
@ -65,10 +65,14 @@ namespace API.Services
|
|||
}
|
||||
series.CoverImage = firstCover?.CoverImage;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(series.Summary) && !forceUpdate) return;
|
||||
|
||||
if (string.IsNullOrEmpty(series.Summary) || forceUpdate)
|
||||
var firstVolume = series.Volumes.FirstOrDefault(v => v.Chapters.Any() && v.Number == 1);
|
||||
var firstChapter = firstVolume?.Chapters.FirstOrDefault(c => c.Files.Any());
|
||||
if (firstChapter != null)
|
||||
{
|
||||
series.Summary = _archiveService.GetSummaryInfo(series.Volumes.First().Chapters.First().Files.First().FilePath);
|
||||
series.Summary = _archiveService.GetSummaryInfo(firstChapter.Files.FirstOrDefault()?.FilePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue