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)

View File

@ -55,14 +55,6 @@ img {
animation: bookmark 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
}
// TODO: Move this into a dedicated component
.loading {
position: absolute;
left: 48%;
top: 20%;
z-index: 1;
}
.highlight {
background-color: var(--manga-reader-next-highlight-bg-color) !important;

View File

@ -1,36 +1,43 @@
@font-face {
font-family: "Fira_Sans";
src: url(../../../../assets/fonts/Fira_Sans/FiraSans-Regular.ttf) format("truetype");
font-display: swap;
}
@font-face {
font-family: "Lato";
src: url(../../../../assets/fonts/Lato/Lato-Regular.ttf) format("truetype");
font-display: swap;
}
@font-face {
font-family: "Libre_Baskerville";
src: url(../../../../assets/fonts/Libre_Baskerville/LibreBaskerville-Regular.ttf) format("truetype");
font-display: swap;
}
@font-face {
font-family: "Merriweather";
src: url(../../../../assets/fonts/Merriweather/Merriweather-Regular.ttf) format("truetype");
font-display: swap;
}
@font-face {
font-family: "Nanum_Gothic";
src: url(../../../../assets/fonts/Nanum_Gothic/NanumGothic-Regular.ttf) format("truetype");
font-display: swap;
}
@font-face {
font-family: "RocknRoll_One";
src: url(../../../../assets/fonts/RocknRoll_One/RocknRollOne-Regular.ttf) format("truetype");
font-display: swap;
}
@font-face {
font-family: "OpenDyslexic2";
src: url(../../../../assets/fonts/OpenDyslexic2/OpenDyslexic-Regular.otf) format("opentype");
font-display: swap;
}
:root {

View File

@ -1,26 +1 @@
@use '../../../../manga-reader-common';
.full-height {
width: auto;
margin: 0 auto;
max-height: calc(var(--vh)*100);
vertical-align: top;
&.wide {
height: 100vh;
}
}
.original {
align-self: center;
width: auto;
margin: 0 auto;
vertical-align: top;
}
.full-width {
width: 100%;
margin: 0 auto;
vertical-align: top;
max-width: fit-content;
}

View File

@ -49,11 +49,13 @@
@font-face {
font-family: "EBGarmond";
src: url("assets/fonts/EBGarmond/EBGaramond-VariableFont_wght.ttf") format("truetype");
font-display: swap;
}
@font-face {
font-family: "Spartan";
src: url("assets/fonts/Spartan/Spartan-VariableFont_wght.ttf");
font-display: swap;
}
label, select, .clickable {

View File

@ -7,7 +7,7 @@
"name": "GPL-3.0",
"url": "https://github.com/Kareadita/Kavita/blob/develop/LICENSE"
},
"version": "0.7.1.1"
"version": "0.7.1.2"
},
"servers": [
{