Epub 3.2 Grouping issue (#1823)

* Added font swapping and removed some unneeded css

* Fixed a bug where epub 3 tags weren't being applied for grouping
This commit is contained in:
Joe Milazzo 2023-02-21 15:32:29 -06:00 committed by GitHub
parent 9b80eba53e
commit 9103228ccc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 27 additions and 35 deletions

View file

@ -421,6 +421,7 @@ public class BookService : IBookService
// Parse tags not exposed via Library
foreach (var metadataItem in epubBook.Schema.Package.Metadata.MetaItems)
{
// EPUB 2 and 3
switch (metadataItem.Name)
{
case "calibre:rating":
@ -437,6 +438,21 @@ public class BookService : IBookService
info.Volume = metadataItem.Content;
break;
}
// EPUB 3.2+ only
switch (metadataItem.Property)
{
case "group-position":
info.Volume = metadataItem.Content;
break;
case "belongs-to-collection":
info.Series = metadataItem.Content;
info.SeriesSort = metadataItem.Content;
break;
case "collection-type":
// These look to be genres from https://manual.calibre-ebook.com/sub_groups.html or can be "series"
break;
}
}
var hasVolumeInSeries = !Tasks.Scanner.Parser.Parser.ParseVolume(info.Title)