Commit Graph

524 Commits

Author SHA1 Message Date
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
renovate[bot]
95ea371bdd chore(deps): update dependency gradle to v8.14.3 (#1858)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-13 23:42:31 -07:00
CounterClops
3b839d06ba fix: remove the personal rating extraction from fb2 books (#1856) 2025-12-13 22:46:30 -07:00
Harsh Vardhan
9da13ae818 Feat/conversion CBX to EPUB compression configuration (#1844)
* feat(conversion): add image compression percentage setting for CBX to EPUB conversion

* feat(conversion): add conversion image compression setting to kobo sync settings frontend
2025-12-13 21:23:19 -07:00
Dmitry Manannikov
708e851e0b Add support for fb2 books (#1757) 2025-12-13 21:16:56 -07:00
WorldTeacher
b64c30f3bc feat(opds): add series hierarchy (#1837)
Co-authored-by: WorldTeacher <admin@theprivateserver.de>
2025-12-13 15:46:59 -07:00
Balázs Szücs
475f605f26 feat(database): create opds_user_v2 and book_marks tables with necessary constraints and indexes (#1833)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-12 10:14:25 -07:00
Balázs Szücs
62ea319536 fix(bookdrop): fix 'Select All' query logic and improve filename fallback for missing metadata (#1828)
* fix(bookdrop): fix 'Select All' query logic and improve filename fallback for missing metadata

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

* fix(tests): update BookDropServiceTest and PathPatternResolverTest to use findAllIds method

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

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-12 08:32:57 -07:00
Aditya Chandel
1916d6c88c Automatically add newly added books to Kobo shelf (#1826) 2025-12-11 20:21:19 -07:00
aditya.chandel
3fb81a35e4 Add IF EXISTS to personal_rating column drops 2025-12-11 19:01:16 -07:00
Muppetteer
8ee53ff7ba Per user personal ratings (#1820)
* Change personal ratings to be saved per user

* Only copy ratings to users with existing progress records
2025-12-11 18:37:21 -07:00
aditya.chandel
503c82fcd7 Fix tests 2025-12-10 13:08:21 -07:00
aditya.chandel
ef7354c256 Update repo url 2025-12-10 13:04:27 -07:00
aditya.chandel
6ecc922408 Fix flyway file versioning 2025-12-10 12:58:14 -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
Balázs Szücs
f97b23ea14 feat(bookmark): implement bookmark management with CRUD operations (#1795)
* feat(bookmark): implement bookmark management with CRUD operations and UI integration

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

* feat(bookmark): add uniqueness constraint for bookmarks and check for existing bookmarks before creation

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

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-10 12:51:51 -07:00
Balázs Szücs
3bfece030b feat(search): Add denormalized search_text column for better book search (#1791)
* fix(search): Optimize book search with denormalized search_text column

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

* fix(search): Enhance search text normalization for diacritics in author names

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

* fix(migration): Implement batch processing for populating search text and enhance error handling

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

* fix(search): Manually trigger search text update after author modifications and enhance special character handling

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

* fix(search): Update special character handling to be more permissive in search text normalization

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

* feat(AppMigrationService): add FileService dependency for enhanced file handling

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

* feat(database): add search_text column to book_metadata for improved search functionality

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

* feat(database): add search_text column to book_metadata for improved search functionality

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

* fix(database): correct join condition and ordering in findBooksForMigrationBatch query

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

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-10 12:51:18 -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
Balázs Szücs
ac38c5d5f6 fix(metadata): Fix genre/category disappearing bug in metadata updates (#1807)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-10 00:24:09 -07:00
Balázs Szücs
28c0fc311d refactor(api): minor QOL updates, code modernization (#1802)
* refactor(api): minor QOL updates, code modernization

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

* refactor(oidc): replace regex literals with compiled patterns for improved performance

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

* refactor(shelf): remove redundant icon type initialization method

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

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-10 00:23:41 -07:00
Muppetteer
ff67bed2c4 Fix: locking fields discards unsaved changes (#1799)
* Fixes data loss on lock fields

* Test combined metadata update and lock field
2025-12-10 00:23:16 -07:00
Aditya Chandel
e2062b5dc6 Allow uploading multiple SVG icons and render them directly as inline SVGs instead of using <img> tags (#1796) 2025-12-09 13:38:39 -07:00
Aditya Chandel
42d2e83599 Add loader for long running operations (#1790) 2025-12-07 20:23:47 -07:00
shiggsy365
b00bc5f908 Add authors hierarchy and series metadata to OPDS feed (#1777)
This commit enhances the OPDS server with two major features:

1. Series Metadata in OPDS Feed:
   - Add series name and book number to OPDS book entries
   - Uses standard OPDS/EPUB 3 metadata format with <meta> tags
   - Includes belongs-to-collection and group-position properties

2. Authors Navigation Hierarchy:
   - Add new /authors endpoint for browsing books by author
   - Implement authors list navigation feed with alphabetical sorting
   - Add author filtering to catalog feed via ?author parameter
   - Support library-based access control for author lists
   - Add authors link to root OPDS navigation

Changes:
- OpdsFeedService: Add series metadata to appendMetadata(), add generateAuthorsNavigation()
- OpdsController: Add getAuthorsNavigation() endpoint
- OpdsBookService: Add getDistinctAuthors() and getBooksByAuthorName() methods
- BookOpdsRepository: Add queries for distinct authors and books by author name
- Updated generateCatalogFeed() to support author parameter
- Updated determineFeedTitle() and determineFeedId() to handle author context

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-07 19:17:57 -07:00
Balázs Szücs
afe9c59380 fix(path): remove trailing dots from path components for Windows compatibility (#1786)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-07 15:17:27 -07:00
Balázs Szücs
5e5bb41585 fix(bookdrop): improve file filtering to ignore .caltrash (calibre generated trash file) (#1785)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-07 15:16:53 -07:00
Aditya Chandel
ad0a99bcbc Add support for uploading and assigning custom SVG icons to libraries… (#1788)
* Add support for uploading and assigning custom SVG icons to libraries and shelves

* Add few default icons
2025-12-07 15:16:22 -07:00
Andrew Roberts
6eae9b88dc Configureable delimiter for remote auth groups (#1782)
* add groups-delimiter (REMOTE_AUTH_GROUPS_DELIMITER) for parsing groups from a remote auth source

* added doc
2025-12-06 20:20:52 -07:00
Jose Alvarez
21e53e1609 Add missing field for Kobo OverDrive expiration check (#1774) 2025-12-06 20:18:18 -07:00
Balázs Szücs
7b5128a511 fix(epub): fix and improve cover image extraction from EPUB files (specifically support for: EPUB 3 specification) (#1773)
* fix(epub): improve cover image extraction from EPUB files

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

* fix(epub): enhance cover image extraction and path resolution

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

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-06 20:17:51 -07:00
Balázs Szücs
d336cde261 fix(bookdrop): ignore dot and underscore files during monitoring (#1771)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-06 20:12:57 -07:00
Ryan Mellmer
05261c84f1 Add OIDC mobile redirect support for mobile apps (#1767)
* Add mobile OIDC authentication endpoint

This adds a new REST endpoint for mobile applications to complete OIDC
authentication. Mobile apps cannot use the web-based OIDC callback because
they need to receive tokens via a custom URL scheme.

New endpoints:
- POST /api/v1/auth/mobile/oidc/callback
  Accepts authorization code, PKCE verifier, and redirect URI.
  Returns Booklore JWT tokens (accessToken, refreshToken).

- GET /api/v1/auth/mobile/oidc/redirect
  Alternative endpoint that redirects to the mobile app's URL scheme
  with tokens as query parameters.

The flow works as follows:
1. Mobile app initiates OIDC auth with PKCE, using its own redirect URI
2. User authenticates with the OIDC provider
3. OIDC provider redirects to Booklore server's oauth2-callback
4. Mobile app calls this new endpoint with the authorization code
5. Booklore exchanges the code for OIDC tokens
6. Booklore validates the tokens and provisions/finds the user
7. Booklore issues its own JWT tokens to the mobile app

This enables iOS/Android apps to use OIDC authentication with Booklore.

* Fix compilation issues in MobileOidcController.java
2025-12-06 09:45:45 -07:00
Balázs Szücs
147c374d51 hotfix(auth): add missing EC algo for Authentik, manually increase timeout limit (#1747)
* hotfix(auth) enhance OIDC JWT validation error messaging and improve JWK source configuration

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

* fix(auth): add RSA algorithm to JWS algorithm set for JWT processing

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

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-05 08:41:28 -07:00
Aditya Chandel
66220b80ee Add sort preference option for Magic Shelf names in the left sidebar (#1749) 2025-12-03 21:44:39 -07:00
Muppetteer
a7fe7b555d Feature: filter mode preference (#1739)
* Feature: filter mode preference

* Flter sorting mode preference

* Filter sorting mode preference

---------

Co-authored-by: Aditya Chandel <8075870+adityachandelgit@users.noreply.github.com>
2025-12-03 21:19:52 -07:00
Aditya Chandel
f22f9bd1e0 Add a user-facing option to enable or disable series view (#1748) 2025-12-03 21:17:06 -07:00
Balázs Szücs
162779a105 fix(metadata): disable merging of moods and tags during metadata updates (#1743)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-03 09:01:48 -07:00
Balázs Szücs
ed5c770f99 fix(amazon): improve localization of Amazon Parser (#1706)
* fix(amazon): review date parsing to support Japanese formats

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

* refactor: enhance Amazon metadata parser robustness and domain support

- Add missing Amazon domains (AE, SA, CN, SG, TR, EG, BE) to DOMAIN_LOCALE_MAP.
- Implement fallback selectors for Title, Authors, Description, Publisher, Publication Date, and ISBNs to support legacy and variant page layouts.
- Support localized 'Publisher' labels (e.g., Herausgeber, Éditeur, Uitgever) in detail bullets.
- Fix brittle date parsing by searching for dates in detail bullets when RPI attributes are missing.
- Improve author extraction with multiple fallback strategies.

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-03 08:57:58 -07:00
Balázs Szücs
cea977062a fix(epub): improve date parsing to support year-only formats and add tests (#1735)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-02 16:44:19 -07:00
WorldTeacher
8e8d57af73 opds sort by addedon Desc by default (#1691)
Co-authored-by: WorldTeacher <admin@theprivateserver.de>
2025-12-02 11:20:40 -07:00
Balázs Szücs
ff2654db1b feat(metadata): consider locked, but empty or null metadata valid (#1729)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-02 10:13:55 -07:00
Sergio Visinoni
d40a650df7 Fix race conditions between Bookdrop and Monitoring Service when importing multiple files (#1709)
* fix(bookdrop): gate library re-registration during single-file moves

- query MonitoringService to see if the library is actively watched before
  unregistering/re-registering it
- lower log noise for these operations and monitoring registration
- expose MonitoringService#isLibraryMonitored via MonitoringRegistrationService
- add FileMoveServiceTest covering monitored vs unmonitored scenarios

This fixes issues when importing multiple files via bookdrop.

Refs: #1608

* fix(bookdrop): avoid unnecessary stacktrace

* Use `deleteIfExists` to avoid trying to delete a missing file

This happens regularly as the file has already been removed by other methods
2025-12-02 10:06:59 -07:00
beedaddy
a179749c93 Re-add "description" to epub metadata extraction (#1727)
A former commit accidentially removed the description field from the metadata extraction.

Fixes #1725
2025-12-02 08:07:09 -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
aditya.chandel
bdeeee6d8d Fix missing import 2025-11-30 09:55:11 -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
e47046aa20 Fix flyway versioning 2025-11-30 09:49:20 -07:00
CounterClops
3ef5b60ed6 Feat: Improve kobo reading state sync logic for better bidirectional support (#1644)
* feat: kobo sync improvements (push changes from booklore, and properly delete kobo data on reset)

* fix: issues with sync race conditions and improve readability

* fix: update function names to be clearer and more explicit

* fix: move partially_read to reading status mapping

* fix: make the bufferwindow more explicit in the unsynced progress check

* chore: add unit tests for additional sync logic

* fix: improve bi-directional logic to account for changes in progress and status

* chore: add additional tests to check the kobo sync logic and remove redundant tests
2025-11-30 09:44:11 -07:00
Balázs Szücs
2336d04a46 refactor(exception): modernize exception handling and method signatures across services and controllers (#1670)
* refactor(exception): modernize exception handling and method signatures across services and controllers

- Remove unnecessary checked exceptions from method signatures
- Replace IOException with UncheckedIOException where appropriate
- Update test methods to match new signatures and remove throws declarations
- Improve converter classes with type safety, logging, and null handling
- Simplify collection assignment logic in metadata and book services
- Enhance author and category tokenization in HardcoverParser
- Add equals/hashCode to ShelfEntity for proper set behavior
- Add comprehensive unit tests for converter and service classes

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

* refactor(entity): update equality and hashCode for JPA entities to use ID; add comprehensive tests and adjust test data to set IDs

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

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-11-30 09:41:15 -07:00