54 Commits

Author SHA1 Message Date
ACX
03272f7c35 chore: add caching, validation, lazy routes, refresh rate limiting, JaCoCo, and cleanup (#2762)
* feat: add login rate limiting to prevent brute-force attacks

* chore: add caching, validation, lazy routes, refresh rate limiting, JaCoCo, and remove dead code
2026-02-15 08:51:25 -07:00
dependabot[bot]
9d3be9ec92 chore(deps): bump the gradle-dependencies group (#2720)
Bumps the gradle-dependencies group in /booklore-api with 2 updates: org.flywaydb:flyway-mysql and [jakarta.xml.bind:jakarta.xml.bind-api](https://github.com/jakartaee/jaxb-api).


Updates `org.flywaydb:flyway-mysql` from 12.0.0 to 12.0.1

Updates `jakarta.xml.bind:jakarta.xml.bind-api` from 4.0.4 to 4.0.5
- [Release notes](https://github.com/jakartaee/jaxb-api/releases)
- [Commits](https://github.com/jakartaee/jaxb-api/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: org.flywaydb:flyway-mysql
  dependency-version: 12.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gradle-dependencies
- dependency-name: jakarta.xml.bind:jakarta.xml.bind-api
  dependency-version: 4.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gradle-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-12 20:48:48 -07:00
Balázs Szücs
697de9052f feat(metadata): add custom metadata write to file support for moods, tags, ratings, and external IDs in PDF, and CBZ (#2552)
* feat(metadata): add BookLore custom metadata support for moods, tags, ratings, and external IDs in EPUB, PDF, and CBZ

- Introduce BookLoreSchema for XMP custom fields and BookLoreMetadata for namespace constants
- Write and extract moods, tags, ratings, and external IDs (Goodreads, Amazon, Hardcover, Lubimyczytac, RanobeDB, Google) in EPUB, PDF, and CBZ metadata
- Store BookLore custom fields in ComicInfo.xml notes and Web fields for CBZ
- Add BookLore fields to XMP metadata in PDF, including moods and tags as separate fields
- Update extractors and writers to handle BookLore fields and ensure separation of categories, moods, and tags
- Add comprehensive tests for BookLore metadata extraction and writing

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(metadata): standardize hardcoverBookId as String and improve identifier handling

- Change hardcoverBookId field and related methods to use String instead of Integer for consistency across extractors and writers
- Update metadata copy helpers and tests to reflect new hardcoverBookId type
- Improve identifier prefix handling in EPUB and PDF extractors to be case-insensitive and trim whitespace
- Allow PDF keywords to be split by comma or semicolon
- Rename TaskCreateRequest#getOptions to getOptionsAs for clarity and update usages
- Adjust series number writing in EPUB metadata to preserve decimals when needed

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(metadata): standardize usage of tags over categories and improve BookLore field extraction

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat(metadata): add rating and ratingLocked fields to BookMetadata and improve PDF metadata extraction

- Add rating and ratingLocked fields to BookMetadata for enhanced rating support
- Refine PDF keyword extraction to handle both comma and semicolon delimiters
- Ensure ISBN fields are only set if cleaned values are non-blank
- Use temp file only stream cache when loading PDFs for metadata writing

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat(metadata): implement ComicInfo.xml writing via JAXB, ensure XSD compliance and add tests for CBX metadata persistence

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat(metadata): enhance metadata extraction with additional identifiers and improve parsing logic

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat(metadata): improve metadata handling by ensuring descriptions are prioritized and enhancing keyword management for PDF compatibility

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(metadata): simplify Pages class structure in ComicInfo.java

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat(metadata): refine PDF metadata writing by isolating categories for legacy compatibility and removing moods and tags from keywords

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat(metadata): enhance PDF metadata extraction and writing with support for additional fields and improved handling of series information

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat(metadata): enhance PDF metadata extraction and writing with support for additional fields and improved handling of series information

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat(metadata): implement secure XML parsing utility and enhance metadata extraction with improved GTIN validation and debug logging

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(metadata): update package structure to align with new organization naming conventions

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* fix(epub-metadata): streamline cover image extraction logic and improve error handling

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat(metadata): enhance PDF and comic metadata extraction with additional fields

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat(metadata): migrate to tools.jackson for JSON processing in sidecar metadata handling

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* fix(epub-metadata): streamline cover image extraction and enhance XML parsing security

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-02-10 09:29:25 -07:00
dependabot[bot]
843b64969c chore(deps): bump the gradle-dependencies group across 1 directory with 7 updates (#2659)
Bumps the gradle-dependencies group with 7 updates in the /booklore-api directory:

| Package | From | To |
| --- | --- | --- |
| org.flywaydb:flyway-mysql | `11.19.0` | `12.0.0` |
| [io.documentnode:epub4j-core](https://github.com/documentnode/epub4j) | `4.2.2` | `4.2.3` |
| [org.jsoup:jsoup](https://github.com/jhy/jsoup) | `1.21.2` | `1.22.1` |
| [org.springdoc:springdoc-openapi-starter-webmvc-ui](https://github.com/springdoc/springdoc-openapi) | `2.8.14` | `3.0.1` |
| [com.github.ben-manes.caffeine:caffeine](https://github.com/ben-manes/caffeine) | `3.2.0` | `3.2.3` |
| [org.assertj:assertj-core](https://github.com/assertj/assertj) | `3.27.6` | `3.27.7` |
| org.hibernate.orm | `7.2.0.Final` | `7.2.4.Final` |



Updates `org.flywaydb:flyway-mysql` from 11.19.0 to 12.0.0

Updates `io.documentnode:epub4j-core` from 4.2.2 to 4.2.3
- [Commits](https://github.com/documentnode/epub4j/compare/v4.2.2...v4.2.3)

Updates `org.jsoup:jsoup` from 1.21.2 to 1.22.1
- [Release notes](https://github.com/jhy/jsoup/releases)
- [Changelog](https://github.com/jhy/jsoup/blob/master/CHANGES.md)
- [Commits](https://github.com/jhy/jsoup/compare/jsoup-1.21.2...jsoup-1.22.1)

Updates `org.springdoc:springdoc-openapi-starter-webmvc-ui` from 2.8.14 to 3.0.1
- [Release notes](https://github.com/springdoc/springdoc-openapi/releases)
- [Changelog](https://github.com/springdoc/springdoc-openapi/blob/v3.0.1/CHANGELOG.md)
- [Commits](https://github.com/springdoc/springdoc-openapi/compare/v2.8.14...v3.0.1)

Updates `com.github.ben-manes.caffeine:caffeine` from 3.2.0 to 3.2.3
- [Release notes](https://github.com/ben-manes/caffeine/releases)
- [Commits](https://github.com/ben-manes/caffeine/compare/v3.2.0...v3.2.3)

Updates `org.assertj:assertj-core` from 3.27.6 to 3.27.7
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.6...assertj-build-3.27.7)

Updates `org.hibernate.orm` from 7.2.0.Final to 7.2.4.Final

---
updated-dependencies:
- dependency-name: org.flywaydb:flyway-mysql
  dependency-version: 12.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: gradle-dependencies
- dependency-name: io.documentnode:epub4j-core
  dependency-version: 4.2.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gradle-dependencies
- dependency-name: org.jsoup:jsoup
  dependency-version: 1.22.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: gradle-dependencies
- dependency-name: org.springdoc:springdoc-openapi-starter-webmvc-ui
  dependency-version: 3.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: gradle-dependencies
- dependency-name: com.github.ben-manes.caffeine:caffeine
  dependency-version: 3.2.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gradle-dependencies
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gradle-dependencies
- dependency-name: org.hibernate.orm
  dependency-version: 7.2.4.Final
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gradle-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-08 13:20:58 -07:00
Balázs Szücs
108d94c0f7 feat(api, build): Upgrade to Java 25, Gradle 9, and Spring Boot 4, Jackson 3 (#2597)
* refactor: simplify RestTemplate and ObjectMapper configurations, add no-args constructors to progress classes

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* chore: update Gradle and Java versions in Docker configuration and build files

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* test: enhance header assertions in tests and add spring-boot-test-autoconfigure dependency

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(tests): migrate to SpringBootTest and update entity management in test cases

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* test: update test property configurations for H2 database in Healthcheck and BookOpds repository tests

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* test: clean up HealthcheckControllerTest by removing unnecessary whitespace and comments

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* test: remove unnecessary whitespace in HealthcheckControllerTest

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* chore: downgrade Flyway version from 12.0.0 to 11.14.1 in build.gradle

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* chore: downgrade Flyway version from 12.0.0 to 11.14.1 in build.gradle

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add @DependsOn annotation for Flyway in MultipartConfig

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add @DependsOn annotation for Flyway in LibraryService

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add test configuration for Flyway in HealthcheckControllerTest
chore: remove unused path variable in deleteLibrary method of LibraryService

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: configure Flyway migration and update test configuration

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: enable remote debugging in bootRun configuration

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: update Flyway version and enhance ObjectMapper configuration

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: remove @DependsOn annotation for Flyway in MultipartConfig and LibraryService

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add NoArgsConstructor and AllArgsConstructor annotations to DTO classes

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add NoArgsConstructor and AllArgsConstructor annotations to FileProcessResult, MetadataUpdateContext, and MetadataUpdateWrapper classes

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add DependsOnDatabaseInitialization annotation to MultipartConfig, AppSettingService, LibraryService, and JwtSecretService classes

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add DependsOnDatabaseInitialization annotation to MultipartConfig and CronService classes

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: implement lazy initialization and thread safety for JWT secret retrieval

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add Flyway dependency and update LibraryService initialization to use ApplicationReadyEvent

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor: remove outdated comments from JwtSecretService class

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor: migrate from com.fasterxml.jackson to tools.jackson for JSON processing

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor: remove unused ObjectMapper bean and related imports from JacksonConfig

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: configure async support with VirtualThreadTaskExecutor in WebMvcConfig

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: enhance application performance with virtual threads and HTTP/2 support

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add JsonSetter annotation to skip null values for triggeredByCron field

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: add triggeredByCron field to TaskCreateRequest and initialize in task management

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat: enable Spring Data web support with DTO serialization in WebMvcConfig

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(UserDefaultsService): simplify class structure and remove unused methods

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(BookOpdsRepositoryDataJpaTest): simplify test setup and use TestEntityManager

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(BookOpdsRepositoryDataJpaTest): update test configuration and simplify entity persistence

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor: update Jackson dependencies and migrate to Jackson 3

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(build.gradle): update jackson-annotations dependency to use Jackson 3 BOM

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(BookOpdsRepositoryDataJpaTest): remove unused ObjectMapper bean definition

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(LibraryService): simplify library deletion logic

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-02-08 10:15:16 -07:00
acx10
91c0382527 refactor: rename package to org.booklore 2026-02-02 00:02:12 -07:00
ACX
3f334202b6 Introduce multi-format book support, including audiobooks (#2486)
* fix: support reading alternative book formats using bookType query param

* feat: add streaming reader support for alternative EPUB formats

* refactor: extract tabs section into MetadataTabsComponent

* feat: implement per-file reading progress tracking

* feat: add configurable format priority with cascading fallback

* refactor: redesign library creator with single-page layout

* refactor: unify reading progress into ReadingProgressService

* refactor: improve delete options with clearer file format and book deletion

* refactor: improve book format matching with normalization and fuzzy fallback

* feat: add folder-based audiobook support with ZIP downloads and preparing state

* fix: display unique format types in metadata viewer

* refactor: auto-attach files to single book in folder during rescan

* feat: implement folder-centric book file grouping with fuzzy matching

* refactor: consolidate book grouping with organization mode support

* fix: use folder hash for folder-based audiobooks in auto-attach

* fix: delete only BookFileEntity on file removal, not entire book

* fix: set folderBased flag and correct file size for auto-attached audiobook folders

* fix: use count query to avoid lazy initialization in file delete handler

* fix: preserve book metadata when file is moved by detecting hash match

* fix: skip books with no files in restoration to avoid NPE

* fix: round all progress percentages to one decimal place before sending to UI

* style: improve library creator dialog spacing and layout

* fix: migrate FOLDER_AS_BOOK to BOOK_PER_FOLDER for backwards compatibility

* fix: FileMoveService now handles multi-file BookEntity properly

* style: redesign metadata-picker and file-mover UI components

* style: redesign file-naming-pattern UI and improve theme contrast

* style: relax spacing in library-creator component

* style: tighten directory-picker layout for consistency

* fix: PathPatternResolver now respects folderBased flag for audiobooks

* style: move checkmark column to left side and add pending status in file-mover

* refactor: consolidate BookFileType into BookType and add audiobook styling

* feat: show 'Continue Reading' button for in-progress books

* fix: preserve dots in folder names during grouping and prevent duplicate attachments

* style: reduce gap between download-all button and primary file section

* style: shorten 'Continue Reading' button to 'Read' on mobile

* feat: add DISK_TYPE config to disable file moves on network storage

* style: standardize settings pages with shared styles and consistent spacing

* style: revamp settings pages with modern card-based layouts

* style: revamp OPDS, auth, and task management settings layouts

* fix: update FileMoveService tests to include AppProperties parameter

* fix: derive BookFileType from extension when uploading additional book files

* feat: show format type and size in download button with dropdown for alternatives

* feat: add audiobook streaming player with HTTP Range support

* feat: add M4B chapter extraction and chapter navigation

* feat: add audiobook bookmarks and sleep timer

* refactor: split AudiobookReaderService into focused services

* feat: add Media Session API for background audio playback

* feat: display file extensions in format tags with distinct colors and add audiobook upload support

* feat: require bookFileId for viewer settings API

* fix: show split button for audiobooks with readable alternatives

* feat: improve reading sessions table with book type badges and better formatting

* feat: add audiobook play button in files tab

* feat: use file extension for format display and meaningful tab values

* feat: add extension field to BookFile DTO

* feat: use extension field for book card format pill

* fix: use mixed orientation for format priority drag-drop to support multi-line layout

* feat: add attach book files feature to consolidate single-file books

* fix: increase drag handle size for format priority chips

* fix: add missing BookFileRepository mock to BookServiceDeleteTests

* feat: add delete buttons to files tab and move shelf to other items menu

* feat: add physical books support for cataloging books without digital files

* refactor: redesign icon-picker component with improved styling

* refactor: redesign metadata-picker component with improved layout and alignment

* refactor: move Add Physical Book to top of library menu

* refactor: use p-autoComplete for authors/categories in add-physical-book dialog

* feat: add square cover search and display support for audiobooks

* fix: navigate to first page when opening unread ebooks

* fix: exclude API requests from service worker interception

* feat: support fileless books with automatic file attachment

* fix: bypass service worker for audiobook streaming requests

* refactor: remove alphabetical filter sorting, default to count, limit filters to 100

---------

Co-authored-by: acx10 <acx10@users.noreply.github.com>
2026-01-27 10:12:50 -07:00
ACX
d75e7e228a Bidirectional progress sync between koreader and booklore reader (#2312)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2026-01-17 22:29:02 -07:00
Sergio Visinoni
2be02017d4 (Refactor) Extract file-specific information from book (#1734)
* refactor(book): extract file-specific information from book

First commit in a series aimed at refactoring the data model for books.
More specifically, the idea is to extract all file-specific information
from the `book` table and move it to the `book_file` table, previously named `book_additional_file`

The aim is to make it easier to:
* Improve support for books with multiple file formats (PDF, EPUB, etc) for all interactions (Read, Download, etc)
* Support for merging/unmerging books
* Add support for additional file types
* Specify preferred formats at the user level

Ref: #489

* refactor(book): ensure the API build and runs

Further work on the refactoring aimed at separating file-related details
from the `book` table.

With this commit all the missing changes that were prventing the API to build
or to book have been addressed.

TODO: test extensively, adjust existing unit tests and add new ones

* fix(read): add mapping for book format

This restores the read functionality which relies on the book format field
to decide which reader to use.

* fix: fix read, dowload and file upload

This commit fixes multiple issues either caused by the refactoring or pre-existing:

* Fix the Read button behaviour after the refactoring
* Unregister the watcher process when uploading additional formats
* Fix downloading of additional book formats (using the wrong ID)

* fix: adjust tests to use the new BookFileEntity class

All the tests that used to fecth file information from BookEntity
now need to get them from the relevant BookFileEntity

* fix: do not rely on AdditionalFileType

* Use the BookFileEntity bookFormat instead

* fix: use the relevant BookFileEntity class

* fix: call the right methods

* fix: Add missing mapping for the test

* fix: adapt the test to the new semantics

All book files, including the primary one, are treated as equal now.
The tests needs to take that into account when checking for additional
formats.

* fix: use mutable lists

* fix: fix syntax for droppung unique constraint

MariaDB uses indexes, not constraints

* fix: regression on book file ordering

We want to make this refactoring 100% compatible with the current behaviour (modulo a few bugs),
therefore we need to maintain the right order to ensure the "primary" book stays the same
after the migration.

* fix: allow download of supplementary files

* fix(opds): replace removed additionalFiles entity graph with bookFiles

- Update BookOpdsRepository @EntityGraph paths to use BookEntity.bookFiles after the refactor
- Add @DataJpaTest to validate BookOpdsRepository wiring and catch invalid EntityGraph attributes
- Add H2 as testRuntimeOnly dependency so the JPA slice test can run with an embedded DB

* chore(bookdrop): mount bookdrop folder from a local directory

It's consistent with the library dir, and makes debugging easier
when working on the local environment

* fix: rename migration after rebase

It's no longer 66, bumped to 73

* fix: handle BookEntity primary file NPEs after rebase

Adjust tests to always instanciate BookFileEntity when manipulating
BookEntity.

* chore: rename migration to avoid conflict

V73 is already taken on develop, V67 was left "unused"

* chore: rename again to ensure it's applied

* fix: make sure to flush the data to DB

Without the flush there is a high chance of leaving the DB in an inconsistent
state after a book move.

* fix: move all files belonging to a book

This fixes a pre-existing bug which has some nasty ramifications.
We never moved "additional files" when changing library for a book entity,
causing them to become effectively "unreacheable" from the UI.

* fix(migration): remove the unique index before importing data

* fix: fix build and test after rebase

* fix(migration): drop legacy table

* fix(upload): use the templetized name when storing on DB

* fix(rebase): Add logical fixes post rebase

* Adapt the code to properly handle the new `archive_type` field and logic
* Bump the version number for the DB migration
* Use `getPrimaryBookFile()` whenever trying to access book files

* fix(migration): Handle additional book formats

* Add support for FB2 files
* Corretly handle cb7 files as CBX

* fix(file mover): fix a regression when moving books across categories

The previous approach would trigger the JPA's `orphanRemoval` parameter on the
bookEntities, effetively triggering a delete on the DB.

This caused files to be moved but the data on the DB would get stale, also causing
additional formats to be treated as separate books upon a rescan.

* fix(rescan): do not delete alternative files on rescan

Upon library rescan, additional files such as images were removed from
book entities association when using the "Each file is a book" library structure.
2026-01-15 18:15:00 -07:00
Balázs Szücs
8dd9b28552 feat(deps): add JPEG2000 support in PDFBox with Jai ImageIO dependencies (#2250)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-12 16:59:56 -07:00
Balázs Szücs
f0444df6ee refactor(images): migrate to TwelveMonkeys ImageIO with graceful unsupported format handling (#2188)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
Co-authored-by: ACX <8075870+acx10@users.noreply.github.com>
2026-01-07 18:12:12 -07:00
ACX
fa3005369f Revamp metadata search UI to display live results (#2195)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2026-01-07 11:26:41 -07:00
Balázs Szücs
f3299915f5 refactor(pdf): update PDFBox usage for improved 3.x compatibility (#2079)
* refactor(pdf): update PDFBox usage for 3.x compatibility and improve file handling

- Use RandomAccessReadBufferedFile and RandomAccessStreamCache for loading PDFs
- Update methods to use new PDFBox 3.x APIs for reading and writing
- Add pdfbox-io dependency to build.gradle
- Add comments regarding compressed mode in PDFBox 3.x

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* test(pdf): remove outdated comments about PDFBox 3.x default compression in save operations

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* test(pdf): remove outdated comments about PDFBox 3.x default compression in save operations

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-01 00:50:46 -07:00
renovate[bot]
3a4a1f3000 chore(deps): update dependency org.flywaydb:flyway-mysql to v11.19.0 (#1868)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-14 01:59:10 -07:00
renovate[bot]
8a520481ae chore(deps): update dependency org.apache.commons:commons-text to v1.15.0 (#1865)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-14 01:58:53 -07:00
renovate[bot]
1382698d54 chore(deps): update dependency org.freemarker:freemarker to v2.3.34 (#1861)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-14 01:58:14 -07:00
renovate[bot]
55eddf4063 chore(deps): update dependency org.assertj:assertj-core to v3.27.6 (#1859)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-13 23:42:52 -07:00
CounterClops
3ce8d496e0 Fix issues with library scans and file moves with a focus on SMB usage (#1744)
* fix: add retry and retry delays to handle smb lag

* fix: issue with importing cb7 files. missing required dependency. Scan would fail prematurely if a cb7 file was present

* fix: cleanup empty subdirectories when cleaning up parent folders

* fix: update folder cleanup to account for SMB delays

* chore: cleanup redundant and weak tests from auto-generated unit tests

* fix: make sleep function name more descriptive

* fix: minor optimisation around path matching

* fix: update xz package to latest version
2025-12-10 12:52:37 -07:00
Muppetteer
cc38079c40 Enable java remote debug on dev docker stack (#1808)
* Enable java remote debug on dev stack

* Enable java remote debug on dev stack

* Update docs with info on docker development stack

* Update dev docs
2025-12-10 12:49:58 -07:00
Aditya Chandel
ff17b74adb Downgrade Java, Spring Boot and Gradle (#1696)
* Revert Spring Boot 4

* Downgrade Java from 25 to 21 and Gradle from 9 to 8
2025-11-30 16:39:56 -07:00
CounterClops
dfb73d50d9 Feature: Add EPUB conversion support for CBX files to Kobo Sync (#1538)
* Feature/kobo sync cbx support (#3)

* Feature: Add CBX syncing support to Kobo sync (#2)

* feat: add cbx sync support

* fix: phrasing of setting description to align with CBX terminology

* fix: resolve issue with CBX setting persistence

* fix: updated dev docker compose to align with Dockerfile

* feat: add cbx files as allowed entitlements

* fix: relax tomcat query characters for kobo sync

* fix: remove hardcoded epub restrictions

* fix: reduce image size and resolve relative content paths

* fix: resolve issues with the image file encoding

* feat: add rar and cb7 support

* feat: bring generated epub more in line with epub standard

* fix: resolve issues with extra metadata fields

* fix: make css background colour white to improve e-ink performance

* cleanup: code comments

* feat: add cbx unit tests

* fix: update zipfile to use builder pattern as current method is deprecated

* fix: remove comments

* fix: replace regex pattern to a simpler check

* fix: remove unused imports

* fix: update epub template to use standard language string

* fix: missing line end on css

* fix: remove duplicate query characters

* fix: grammer issue

* fix: resolve typo in the entitlement service test

* fix: redundant imports and update long types

* chore: update test descriptions for cbx conversion

* fix: add check for larger images in archive files. unlikely to occur.

* fix: merge temp dir logic for the book download

* fix: update kobo entitlement to always report the format as epub3

* fix: implement suggested changes around javadocs and some edge cases to handle gracefully

* chore: cleanup variable names to be clearer in download service

* feat: change function to extract to disk instead of storing images in memory

* fix: add temp file clean up into the conversion service

* fix: add visual divider to seperate CBX and EPUB settings

* fix: update lambdas to use method references

* fix: reword setting description for cbx to epub sync

---------

Co-authored-by: Aditya Chandel <8075870+adityachandelgit@users.noreply.github.com>
2025-11-30 09:53:26 -07:00
Aditya Chandel
d647fe401e Upgrade Spring Boot to version 4.0.0 (#1667)
* Upgrade Spring Boot to version 4.0.0

* Fix flyway config
2025-11-28 14:10:14 -07:00
Aditya Chandel
46225a3c0e Upgrade Spring Boot to version 4.0.0 (#1666) 2025-11-28 13:35:40 -07:00
Aditya Chandel
d90cb73148 Unify TasksV1 and TasksV2 implementations (#1358) 2025-10-15 19:59:30 -06:00
Aditya Chandel
7133ef1a69 Upgrade project environment to Java 25 and Gradle 9 (#1277) 2025-10-06 12:53:34 -06:00
Ruben GM
2e537bb2a1 feat: ComicInfo.xml support for CBX files (#1073)
* write, read ComicInfo.xml for CBZ files

* updated with recommendations from previous PR https://github.com/booklore-app/booklore/pull/1069

* read ComicInfo.xml on CBR, extract first image for CBZ/CBR files, save CBR metadata in ComicInfo.xml as CBZ

* Delete CBR file after CBZ conversion. Update DB

* Backs up file before updating. Restores back up if errored

* Test classes

* Update booklore-api/src/main/java/com/adityachandel/booklore/service/metadata/BookMetadataUpdater.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update booklore-api/src/main/java/com/adityachandel/booklore/service/metadata/writer/CbxMetadataWriter.java

Updating RAR binary availability check

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update booklore-api/src/main/java/com/adityachandel/booklore/service/metadata/extractor/CbxMetadataExtractor.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update booklore-api/src/main/java/com/adityachandel/booklore/service/metadata/extractor/CbxMetadataExtractor.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Code updates from PR suggestions

* Support to extract ComicInfo.xml for .cb7 files

* Writer extension for .cb7 files

* Adding com.github.junrar to build.gradle (forgot in previous commit)

* Settings toggle to control CBR/CB7 to CBZ conversion

* indentation complains

* removed duplicated junrar inport

* Restore comicinfo.xml metadata in edit view

* retrieve ComicInfo.xml metadata for new files in library scan

* private class definition was missed after merge

* Delete 

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-09 08:16:29 -06:00
Alexander Puzynia
b81a8d1422 Book additional files support (1/3) (#868)
* feat(api/model): add new entity BookAdditionalFileEntity

* feat(api/db): add book additional file repository

* feat(api/db): add migration

* test(api/db): add book additional file repository test

* test(api/db): add book additional file repository tests for hash uniqueness

* feat(api/domain): add support to additional file model

* feat(api): add additional files controller

* refactor(api): move addAdditionalFile to FileUploadService as uploadAdditionalFile method

* feat(service): search book by additional file

* feat(services): process deleted additional files with ability to promote alternative formats to book instead of deleting them

* refactor(util): use common code to resolve patter for entity and domain object

* feat(service): move additional files

* test(service): test move additional files along with book itself
2025-08-27 08:11:04 -06:00
aditya.chandel
e9cbc36768 Update Frontend and Backend Dependencies - August 2025 2025-08-09 01:04:18 -06:00
aditya.chandel
177528e640 Implement Bookdrop: Watch folder for file drops and auto-process uploads 2025-07-19 11:05:59 -06:00
aditya.chandel
841e359b92 Support File Move Operations with Watcher Refactor for Accurate Tracking 2025-07-04 11:19:23 -06:00
aditya.chandel
b155f567a4 Deleting books now cleans up empty directories left behind 2025-06-30 17:31:34 -06:00
aditya.chandel
86dfc515a7 Support writing metadata directly into PDF files 2025-06-27 14:48:49 -06:00
aditya.chandel
32bf75dcfe Update Spring Boot Stack to Latest Stable Versions (June 2025) 2025-06-04 18:29:40 -06:00
aditya.chandel
204a155582 feat: Leverage fuzzy logic for more accurate metadata resolution and support Amazon cookies
- Improved metadata matching using fuzzy string comparison with threshold-based author validation
- Added support for optional Amazon session cookie to enhance data retrieval and bypass rate limiting
2025-05-30 12:29:00 -06:00
aditya.chandel
ff64362edb Implement support for comic book files (CBZ, CBR and CB7) 2025-05-23 22:58:23 -06:00
adityachandelgit
817b572c08 Implement OIDC authentication 2025-05-14 14:58:20 -06:00
adityachandelgit
09ee9ec357 Suppress noisy Spring boot logs, Hikari warnings, and clean Quartz/Hibernate startup output 2025-04-30 21:51:40 -06:00
adityachandelgit
4546d3e232 Update Angular and Spring Boot dependencies (April 2025) 2025-04-15 13:34:48 -06:00
aditya.chandel
c957f56b86 Implement functionality for sending books via email 2025-03-19 05:39:36 -06:00
aditya.chandel
093592179d Prepare for open source and stopped tracking application-local.yaml 2025-03-11 18:17:23 -06:00
aditya.chandel
c10f046c5b Update BE dependencies 2025-03-11 13:21:23 -06:00
aditya.chandel
d3627a2d3f Checkpoint: Authentication 2025-02-15 21:43:06 -07:00
aditya.chandel
494aba24c6 WIP: Dockerize 2025-01-22 16:05:47 -07:00
aditya.chandel
f5e1c1e7c8 Switch to H2 DB 2025-01-17 10:58:42 -07:00
aditya.chandel
f6f5f718af Add swagger 2025-01-16 14:44:03 -07:00
aditya.chandel
c7069132b6 Implement file downloading functionality 2025-01-16 14:27:14 -07:00
aditya.chandel
ceb344677c WIP: ePub support 2025-01-14 11:29:15 -07:00
aditya.chandel
7e748bb79a Some logging 2025-01-05 23:58:29 -07:00
aditya.chandel
08e1b2761d - Use quartz for metadata job management
- Improve build.gradle
2025-01-05 23:09:41 -07:00
aditya.chandel
8815ad25d1 - Use mapstruct instead of manual transformer
- Rename Entities and DTOs
- Implement refresh metadata
- Delete old unused metadata dialog
2025-01-05 17:22:20 -07:00