* feat(pdf): integrate PDFium4j for PDF processing and metadata extraction
* feat(pdf): update PDFium4j to version 0.12.0 and optimize XMP metadata handling
* feat(pdf): update PDFium4j to version 0.13.0
* feat(pdf): enhance cross-compilation support and improve XML parsing in metadata extraction
* Delete dev.local-libs.docker-compose.yml
* feat(pdf): update PDFium4j to version 0.14.0
* Squashed commit of the following:
commit e799d02a1b3557fcbe9c67bd276ced9ddc783e83
Author: Nam Le <namle888029@gmail.com>
Date: Wed Apr 1 18:47:08 2026 +0700
should be done
commit d232c4d48bd97dbc7d8d800cdb3d18e85a73b8ec
Author: Nam Le <namle888029@gmail.com>
Date: Wed Apr 1 18:32:49 2026 +0700
ok done
commit 911d69c3347c6596ae0feb3261355f7b234b6171
Author: Nam Le <namle888029@gmail.com>
Date: Wed Apr 1 18:32:15 2026 +0700
dont break pls
commit 498e996bb42a74f9edda65b914a9124b15a8baea
Author: Nam Le <namle888029@gmail.com>
Date: Sat Mar 21 11:35:32 2026 +0700
changes:
+ avoid double caching
+ detach get & validate logic
+ error handling for cache insert
commit a215d11d6855a3381e4f2ecbca32d45d4b06869f
Author: Nam Le <namle888029@gmail.com>
Date: Fri Mar 20 22:01:37 2026 +0700
fix dup
commit 539b70f6f9c859bdf6d2a2557e3ba1c1fc10a601
Author: Nam Le <namle888029@gmail.com>
Date: Fri Mar 20 21:46:43 2026 +0700
fix
+ leaking Blob resource
+ scss lint
+ extra `}`
commit d1c8ceea944c0a25a9a2a54bb83122e0a9480b05
Author: NamLe029 <146613205+NamLe029@users.noreply.github.com>
Date: Fri Mar 20 21:34:14 2026 +0700
Apply suggestions from code review
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
commit ca14572c8c6df143295ebff2acf210f3a5164ed5
Author: Nam Le <namle888029@gmail.com>
Date: Fri Mar 20 20:25:46 2026 +0700
wording
commit 558b0f69fe6a6736aa114f592abd87451b173ccb
Author: Nam Le <namle888029@gmail.com>
Date: Fri Mar 20 19:51:28 2026 +0700
remove dexie
commit 4b0750824685e70dd5a13fd9e899064fd6b009c6
Author: Nam Le <namle888029@gmail.com>
Date: Fri Mar 20 19:22:43 2026 +0700
use observable for pdf bookdata
commit 1c88aff7c01a51a5263aca3522797624ed794862
Author: Nam Le <namle888029@gmail.com>
Date: Wed Apr 1 18:07:14 2026 +0700
switch to cache storage
commit c766428c32b97fab339b3438b6c4e693082a07a3
Author: Nam Le <namle888029@gmail.com>
Date: Fri Mar 20 15:13:42 2026 +0700
error handling
commit bdbaa8f5f769fcd80f3f93aac0c52ffba8bcec27
Author: Nam Le <namle888029@gmail.com>
Date: Fri Mar 20 14:16:49 2026 +0700
cleanup unecessary validation
commit 56e264ee5570948cf1512c8ce4de4622430d3cdc
Author: Nam Le <namle888029@gmail.com>
Date: Fri Mar 20 12:50:45 2026 +0700
apply simpleCacheService
commit 45ef6ae5d460b27d134b696951fd613eefcb2d64
Author: Nam Le <namle888029@gmail.com>
Date: Wed Apr 1 18:02:44 2026 +0700
interface for local settings
commit 421305dbcb108647b5f0cc29c567de5daee2a93d
Author: Nam Le <namle888029@gmail.com>
Date: Wed Apr 1 18:01:20 2026 +0700
simple cache service for caching request response
commit 1aa81b4a08b006d52e398da61464527fd90e51cb
Author: Nam Le <namle888029@gmail.com>
Date: Fri Mar 20 12:47:54 2026 +0700
local settings service for device-scoped settings
commit 647b4f561336617651f5c4f14fe83dc70df3f30f
Author: Nam Le <namle888029@gmail.com>
Date: Fri Mar 20 12:46:35 2026 +0700
add dexie dependency
commit d8bfed64b0096c2d99052fceee718413b5dc8b40
Author: Nam Le <namle888029@gmail.com>
Date: Fri Mar 20 12:46:00 2026 +0700
enable HTTP Caching (Last-Modified) for PDF, EPUB, audiobook content response
* delete unused
* final touch
* move local settings
* test
* remove test case for deleted method
* lint
---------
Co-authored-by: brios <127139797+balazs-szucs@users.noreply.github.com>
* build: drop unrar from dockerfile
* build: add libarchive to dockerfile
* ci: add libarchive for tests
* build: try adding to the gradle build
* refactor: use nightcompress for reading CBX
* test: disable tests using nightcompress when unavailable
* ci: drop showing java information
* build: add libarchive to dev compose
* build: fix libarchive link in alpine
seems alpine doesn't create libarchive.so and this seems to be the
easiest approach to fix that
* build: use expected order for allowing java to use native libs
* fix: ensure we initialize NightCompress before using it
* fix: properly find input stream
* fix: return amount of data copied
* test: add helper to turn off tests in ArchiveService
* test: rewrite CbxMetadataExtractorTest to mock archiveService
* refactor: expose `Path` to make `CbxMetadataExtractor` easier to test
* test: drop now useless test
* test: add archiveservice to rar5 integration
* test: mock out archiveservice in cbxreader test
* test: use real archiveservice in cbxconverstionintegration
* file: the cbxconversionservicetest also seems to be integration
* test: remove unused imports from cbxmetadataextractortest
* test: cbxcomicinfocompliance is also an integration
* test: cbxmetadatawriter is also integration
* chore: drop unused properties
* test: make cbxmetadataextractortest do something for covers
before it was basically useless because of fallback
* fix: invert check
* chore: better comment
* test: fix more cbxmetadataextractor tests that never worked
* test: we only ever raise ioexception
* fix: handle `null` comicinfo when parsing
* test: properly test for no files comicinfo
* build: manual link of dev docker compose
* test: if you use any matchers, all must be
* build: drop unrar from dev compose
* test: if you use any matchers, all must be
* test: always get a fresh stream
* test: drop more toFile
Physical books have no associated file, so calling getPrimaryBookFile()
returns null. The metadata manager was crashing with NullPointerException
when merging/consolidating metadata (authors, genres, etc.) that included
physical books.
This fix skips physical books in writeMetadataToFile() since there is no
file to write metadata to.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* chore(apiTests): migrate BookCreatorServiceTest assertions to AssertJ
- Replaced JUnit assertions with AssertJ for richer failure messages
- Tightened collection assertions to verify element values rather than just size
- Removed redundant addAuthorsToBook_nullExistingAuthorsOnEntity_initializesSet test
- Added coverage-gap comment noting untested methods and missing cases
* chore(apiTests): reduce test complexity in BookCreatorServiceTests
- Changed to using parameterized tests where tests were the same apart from inputs
- Modified tests to be more specific about what exactly that test is checking
* refactor(api): simplify routes for kobo thumbnails
the versioned thumbnails are not seemingly called by kobo
and are not in other implementations of kobo sync
* feat(api): use redirect for kobo book images
* chore(api): add documentation for thumbnail redirect
* fix: use ISBN to match the edition to sync
* fix: optimize fallback to default editions when ISBN is not present
* chore: added tests for hardcover sync
* fix: handle cases where hardcover does not have page count
* chore(deps): bump actions/setup-node from 6.2.0 to 6.3.0 (#1)
Dependabot couldn't find the original pull request head commit, ea510f40fc1855aa17a782e05b0d30547e84955e.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump docker/setup-buildx-action from 3.12.0 to 4.0.0 (#2)
Dependabot couldn't find the original pull request head commit, faed6bf8a712c5fc793fa628157de25d97888131.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump docker/build-push-action from 6.19.2 to 7.0.0 (#3)
Dependabot couldn't find the original pull request head commit, f110823720b6dd773df014ba288a126d8837fe28.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump docker/login-action from 3.7.0 to 4.0.0 (#6)
Dependabot couldn't find the original pull request head commit, 9a8d7a1daf5afff06bb35e36607c3da9aa730e21.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(archive): infer archive type via Magic Numbers instead of filename
* fix(archive): improve archive type detection and improve logging for cover image retrieval
---------
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
this updates the cron to avoid running the telemetry ping when
telemetry is disabled so that personally identifiable information
is not sent off to other parties (an IP address, an installation ID)
* Add BOOK_PER_FILE and BOOK_PER_FOLDER organization modes for library scanning
* Filter temp/partial files, support .ignore directories, and skip zero-byte files during scanning
* Replace event-based monitoring with WatchService, add pending deletion pool and move detection
* Fix folder-based audiobook grouping, improve series detection, and add tests
* Add unit tests for BookFileTransactionalHandler, BookFilePersistenceService, and LibraryFileEventProcessor
* overhaul OIDC: backend token exchange, security hardening, group mapping, session management
* add unit tests for OIDC overhaul (166 tests across 12 classes)
* rewrite unit tests for metadata and extractor packages (~450 tests)
* fix Kobo sync timeout with large magic shelves (#3172)
* fix: clean ISBN should allow ISBNs to have an X at the end
* hardcover mood filter overload for just list of tags
* When ISBN is given, fetch the book directly by the edition with that ISBN, and provide metadata from that edition
* chore: improved formatting
* PR improvements
* replaced CachedTag with GraphQL specific class
* moved hardcover cached tag to shared model
* fix(metadata): ensure EPUB version-aware metadata writing
EpubMetadataWriter unconditionally wrote EPUB3-only constructs into
all EPUB files regardless of version, producing invalid OPF documents
for EPUB3 files (e.g. opf:file-as/opf:role attributes on dc:creator)
and writing EPUB3-only elements into EPUB2 files.
Changes:
- createCreatorElement: EPUB3 uses <meta refines="#id"> for file-as/role;
EPUB2 uses opf: attributes on dc:creator
- addFolderContentsToZip: mimetype is now STORED (uncompressed) and
written as the first ZIP entry per EPUB spec
- replaceBelongsToCollection: EPUB3 uses belongs-to-collection with
refines; EPUB2 uses calibre:series/calibre:series_index convention
- addSubtitleToTitle: EPUB3 uses separate dc:title with title-type
refinement; EPUB2 stores subtitle via booklore:subtitle metadata only
- addBookloreMetadata/createBookloreMetaElement: EPUB3 uses property
attribute with prefix; EPUB2 uses name/content attribute form
- removeAllBookloreMetadata: now handles both EPUB3 property and EPUB2
name attributes
- cleanupCalibreArtifacts: preserves calibre:series and
calibre:series_index metas used for EPUB2 series
- organizeMetadataElements: correctly categorizes EPUB2-style series
and booklore metas into their respective buckets
- addBookloreMetadata: writes booklore:subtitle for round-trip fidelity
- Added isEpub3() helper method
Closes#2997
* fix(metadata): address review feedback for EPUB version-aware writing
- Only preserve calibre:series/calibre:series_index for EPUB2 in
cleanupCalibreArtifacts; EPUB3 files now properly remove stale entries
- Use isEpub3() helper in createCreatorElement instead of inline detection
- Add trim() to isEpub3() to handle whitespace in version attribute
- Log warning when mimetype file is missing from extracted EPUB
Restores and extends the EPUB metadata extraction work from PR #1879
with additional fixes for field mapping gaps found in the processor,
BookDrop finalization, and JSON sidecar.
EPUB Metadata Extractor (EpubMetadataExtractor.java)
- Restore Calibre user_metadata iteration that was regressed: now
iterates <calibre:user_metadata> elements and maps custom columns
via CALIBRE_FIELD_MAPPINGS
- Add #age_rating and #content_rating to CALIBRE_FIELD_MAPPINGS
so Calibre-managed rating/rating string fields are imported
- Add CALIBRE_IDENTIFIER_PREFIXES map for calibre: identifier
fallback (hardcover_book, lubimyczytac, ranobedb, etc.)
- Support both read paths: booklore: namespace (round-trip) and
Calibre user_metadata (first import from Calibre library)
- Validate age_rating values against VALID_AGE_RATINGS whitelist
EPUB Metadata Writer (EpubMetadataWriter.java)
- Write booklore:age_rating and booklore:content_rating to the
OPF so values survive a round-trip rescan
Metadata Change Detector (MetadataChangeDetector.java)
- Mark ageRating and contentRating as includedInFileWrite=true so
saving either field triggers a write-back to the EPUB file
EPUB Processor (EpubProcessor.java)
- Map extracted ageRating and contentRating from BookMetadata DTO
into BookMetadataEntity in setBookMetadata(); these two lines were
the silent reason values never reached the DB on library scan
BookDrop Service (BookDropService.java)
- Change processMovedFile() from REPLACE_ALL to REPLACE_WHEN_PROVIDED
when applying bookdrop review metadata after file extraction.
REPLACE_ALL unconditionally calls the setter even with null, wiping
ageRating/contentRating that EpubProcessor just extracted from the
file. REPLACE_WHEN_PROVIDED skips null fields and preserves the
file-extracted values when the bookdrop review form does not submit
those fields.
JSON Sidecar (SidecarIdentifiers.java, SidecarMetadataMapper.java)
- Add missing hardcoverBookId field to SidecarIdentifiers DTO
- Write hardcoverBookId in buildIdentifiers() (toSidecarMetadata path)
- Read hardcoverBookId in toBookMetadata() (sidecar import path)
All other identifiers were already present; hardcoverBookId was the
only one absent from all three locations simultaneously.
Tests (EpubMetadataExtractorTest.java)
- Add comprehensive test coverage for both extraction paths:
booklore: namespace (round-trip) and Calibre user_metadata/
identifier extraction including age_rating and content_rating