mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 12:35:30 +02:00
fixed a bug with the new PdfExtractor where Pdfs would have an extra page, generating an error when requested
This commit is contained in:
parent
6a5a6dc1f4
commit
7c260add4d
3 changed files with 7 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ plugins {
|
|||
}
|
||||
|
||||
group = "org.gotson"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class PdfExtractor : ArchiveExtractor() {
|
|||
|
||||
override fun getPagesList(path: Path): List<BookPage> =
|
||||
PDDocument.load(Files.newInputStream(path)).use { pdf ->
|
||||
(0..pdf.numberOfPages).map { index ->
|
||||
(1..pdf.numberOfPages).map { index ->
|
||||
BookPage(index.toString(), mediaType)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
update BOOK_METADATA
|
||||
set STATUS = 'UNKNOWN'
|
||||
where ID in (
|
||||
SELECT ID FROM BOOK_METADATA where MEDIA_TYPE = 'application/pdf'
|
||||
);
|
||||
Loading…
Reference in a new issue