Skip to content

Commit

Permalink
fixed a bug with the new PdfExtractor where Pdfs would have an extra …
Browse files Browse the repository at this point in the history
…page, generating an error when requested
  • Loading branch information
gotson committed Sep 7, 2019
1 parent 6a5a6dc commit 7c260ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion komga/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plugins {
}

group = "org.gotson"
version = "0.3.0"
version = "0.3.1"

repositories {
jcenter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
update BOOK_METADATA
set STATUS = 'UNKNOWN'
where ID in (
SELECT ID FROM BOOK_METADATA where MEDIA_TYPE = 'application/pdf'
);

0 comments on commit 7c260ad

Please sign in to comment.