PDF Parser Changes (#3681)
This commit is contained in:
parent
da9f02f963
commit
5738014a88
6 changed files with 42 additions and 5 deletions
|
@ -71,6 +71,11 @@ public class PdfParser(IDirectoryService directoryService) : DefaultParser(direc
|
|||
// Patch in other information from ComicInfo
|
||||
UpdateFromComicInfo(ret);
|
||||
|
||||
if (comicInfo != null && !string.IsNullOrEmpty(comicInfo.Title))
|
||||
{
|
||||
ret.Title = comicInfo.Title.Trim();
|
||||
}
|
||||
|
||||
if (ret.Chapters == Parser.DefaultChapter && ret.Volumes == Parser.LooseLeafVolume && type == LibraryType.Book)
|
||||
{
|
||||
ret.IsSpecial = true;
|
||||
|
@ -79,6 +84,19 @@ public class PdfParser(IDirectoryService directoryService) : DefaultParser(direc
|
|||
ParseFromFallbackFolders(filePath, rootPath, type, ref ret);
|
||||
}
|
||||
|
||||
if (type == LibraryType.Book && comicInfo != null)
|
||||
{
|
||||
// For books, fall back to the Title for Series.
|
||||
if (!string.IsNullOrEmpty(comicInfo.Series))
|
||||
{
|
||||
ret.Series = comicInfo.Series.Trim();
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(comicInfo.Title))
|
||||
{
|
||||
ret.Series = comicInfo.Title.Trim();
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(ret.Series))
|
||||
{
|
||||
ret.Series = Parser.CleanTitle(fileName, type is LibraryType.Comic);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue