Commit Graph
442 Commits
Author SHA1 Message Date
astrodad 3a8a46b3cc Added timestamp from koreader_last_sync_time to returned json on GET for KOReader Sync API (#1518) 2025-11-20 21:12:33 -07:00
beedaddy 278b11e9e1 Enhancement: Import custom pagecount field from calibre (#1486)
* Enhancement: Import custom pagecount field from calibre

Calibre exports custom columns as JSON strings. This PR parses this JSON data and adds the pagecount value to booklore.
By convention, the calibre column must be named "pagecount".

* Don't use another external library for JSON
2025-11-20 21:10:29 -07:00
Balázs Szücs 5c42e2e765 refactor(api, test): improve readability and code quality across services, and tests (#1494)
* refactor(tests): improve readability and consistency across services

- Replace field declarations with local variables in test setup methods to simplify code.
- Introduce constants for patterns and update regex logic in `BookMediaController`.
- Improve assertions and use more precise methods like `getFirst()` in tests.
- Utilize `EnumMap` and `EnumSet` for better performance and memory efficiency in metadata logic.
- Concatenate XML strings using multi-line strings or simplify where applicable.
- Deprecate and refactor user provisioning to ensure consistency and reuse of logic.
- Add additional parameters such as `watch` in `Library` entities and set defaults in builders.
- Replace manual comparator logic with core library features like `Comparator.reverseOrder`.
- Update metadata merging methods to use `getFirst()` for target values.
- Adjust mocked objects to include additional fields in validation methods.

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

* refactor(service): remove deprecated user provisioning method

- Remove `provisionRemoteUser` method marked as deprecated in `UserProvisioningService`.
- Encourage use of `provisionRemoteUserFromHeaders` as the preferred entry point.

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

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-11-20 21:09:39 -07:00
Subhashini Ganesh cb8f5e7a29 Fix: Normalize paths for relative sub-path calculation (#1501)
Fixes a bug preventing import of books with duplicate filenames in
different sub-folders.

The path relativization in FileUtils.getRelativeSubPath would fail in
some cases, yielding an empty sub-path. This caused a database
unique index violation as only the filename was saved as the filePath.

This commit fixes the issue by normalizing both paths before
relativization. Adds FileUtilsTest.java to validate the fix.

Fixes #1499
2025-11-20 21:08:39 -07:00
beedaddy 14692b0176 Fix: Detect ISBN even if "scheme" is empty. (#1484)
This is often the case if book comes from calibre.

Fixes #1483
2025-10-31 01:23:06 -06:00
vhqkze d2db787867 fix: improve KOReader compatibility with Content-Disposition filename encoding (#1475)
Adjust the encoding of the `filename` attribute within the
`Content-Disposition` header to ensure better compatibility with
KOReader.

Previously, `Content-Disposition` was constructed using Spring's
`ContentDisposition.builder()`, which KOReader could not properly get
the correct filename.

This update modifies the `filename` attribute to replace non-ASCII
characters with underscores, providing a more robust fallback filename
that KOReader can correctly process. It also maintains the `filename*`
attribute for UTF-8 encoded filenames, allowing modern clients to
display the full filename.
2025-10-31 01:21:32 -06:00
Balázs Szücs a5183c0953 refactor(api): refactor obsolete APIs including: (#1467)
- obsolete Date APIs
- obsolete Zipfile from Apache Commons Compress Updates
- JWT related obsolete APIs
- deprecated Junrar method
etc...

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-31 01:20:38 -06:00
Balázs Szücs e479eb2452 feat(metadata-parser): improve Amazon parser with international locale support (#1473)
- Added locale mapping for Amazon domains to support diverse language/format specific parsing.
- Improved date parsing logic by introducing multiple date formats and locale-specific handling.
- Updated rating and review parsing to handle international formats (e.g., comma as decimal separator).
- Adjusted request headers to dynamically include locale-specific `accept-language`.
- Enhanced logging for parsing failures to provide clearer insights into issues.

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-31 01:19:28 -06:00
Balázs Szücs b592e3677a refactor(tests): replace runtime-dependent timestamps with fixed values (#1469)
- Introduced fixed timestamps for `Instant` and `LocalDateTime` in multiple test classes.
- Replaced calls to `Instant.now()` and `LocalDateTime.now()` with predefined fixed values for consistency and test stability.

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-31 01:18:43 -06:00
Balázs Szücs cd0ca7ffa8 refactor(api): Use try-with-resources for better resource management (#1457)
- Use `try-with-resources` for better resource management in `EpubMetadataWriter` and `AppMigrationService`.
- Use a single `HttpClient` instance in `GoogleParser` to improve efficiency.

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-27 13:38:58 -06:00
Balázs Szücs 947a12c20a refactor(api): use pre-compiled Pattern variables instead of dynamic regular expressions (#1450)
* refactor(api): centralize and standardize regex patterns

- Extract inline regex strings to named constants
- Consolidate duplicate patterns across multiple backend classes
- Improve pattern readability with verbose regex syntax and comments

Commit improves code maintainability by eliminating pattern duplication and making regex logic more explicit without altering functionality.

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

* refactor(api): centralize regex patterns for improved maintainability

- Extracted inline regex strings to named constants across multiple classes.
- Replaced duplicate inline patterns with shared constants.
- Enhanced code readability and reduced redundancy without changing behavior.

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

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-10-26 22:53:22 -06:00
Aditya Chandel 9065d065fb Fix: Cannot delete user after KOReader setup (#1454) 2025-10-26 22:40:21 -06:00
Aditya Chandel 11e59f7588 Add configurability to dashboard scrollers with support for magic shelves (#1453) 2025-10-26 11:51:06 -06:00
Aditya Chandel 5759934e41 Fix websocket OIDC check (#1436) 2025-10-24 17:48:35 -06:00
Aditya Chandel f4beb80d38 Fix Cleanup Temporary Metadata task (#1435) 2025-10-24 17:47:19 -06:00
Aditya Chandel 8e0a2d8d00 Fix: Resolved “Book archive too large to cache” error (#1434) 2025-10-24 16:49:44 -06:00
Aditya Chandel ccf19c7f5f Recompute fingerprint after cover update to ensure consistency (#1429) 2025-10-23 23:48:57 -06:00
Aditya Chandel ee0d6b8e4b Improve EPUB cover replacement for EPUB 2/3 and ensure covers display correctly on client devices (#1428) 2025-10-23 23:23:28 -06:00
Aditya Chandel 5fe62ac576 Implement task scheduling system (#1427)
* Implement task scheduling system

* Remove tests
2025-10-23 22:49:42 -06:00
Chris Debenham 2f6ae855dd Re-enable ForwardAuth and have ForwardAuth work using email address (#1426)
* Fallback to using email for auth if user not defined by forwardauth

* Re-enable RemoteAuth

* Update build env
2025-10-23 21:57:08 -06:00
aditya.chandel d94d69b90a Fix image caching 2025-10-23 00:41:45 -06:00
Aditya Chandel d7f8fc43a6 Add the /api prefix to the Swagger endpoints so it works correctly behind the internal Nginx. (#1418) 2025-10-22 21:46:03 -06:00
Aditya Chandel 4e268ab199 Fix: bulk metadata editor not working (#1415) 2025-10-22 16:28:13 -06:00
Aditya Chandel b226c43343 Secured /media endpoints behind authentication tokens (#1407) 2025-10-21 21:28:10 -06:00
vhqkze 1130bf89ce fix: support non-ASCII filenames in Content-Disposition (#1405) 2025-10-21 21:11:41 -06:00
Aditya Chandel 9186ea0c67 Refactor file mover to ensure faster transfers and more reliable handling (#1406) 2025-10-21 21:10:46 -06:00
Aditya Chandel 1edc55e4f0 Fix: xml error with opds in moon reader (#1396) 2025-10-20 14:30:18 -06:00
Aditya Chandel 15e0c81ce9 Replace hardcoded Amazon domains with configurable value from AppSettings (#1385) 2025-10-18 09:26:03 -06:00
Zach e266335e23 Fix hardcoded OIDC mapping (#1371) 2025-10-17 21:56:26 -06:00
aditya.chandel 3cbb86e66c Fix OPDS 2025-10-17 13:36:43 -06:00
Aditya Chandel 8a795985aa Consolidate OPDS endpoints and implement structured navigation feeds (#1375) 2025-10-17 13:16:15 -06:00
Aditya Chandel 8d0d23ba85 Remove obsolete Email v1 implementation (#1365) 2025-10-16 13:20:11 -06:00
aditya.chandel d9528af522 Add severity to UI logs 2025-10-15 23:59:20 -06:00
aditya.chandel c8a9075afb Fix email v2 2025-10-15 23:10:55 -06:00
Aditya Chandel ed4d9e5321 Allow admins to optionally share email providers with users (#1359) 2025-10-15 21:46:27 -06:00
Aditya Chandel d90cb73148 Unify TasksV1 and TasksV2 implementations (#1358) 2025-10-15 19:59:30 -06:00
Aditya Chandel 675bed1a65 Optimize and refine how book similarity is calculated (#1356) 2025-10-15 14:45:56 -06:00
aditya.chandel a8424e8592 Add option (env variable) to force disable OIDC 2025-10-15 10:47:59 -06:00
Aditya Chandel 30f31c4afd Automatically set KOReader ‘Finished On’ date when reading progress reaches 99.5%. (#1353) 2025-10-15 09:17:53 -06:00
Aditya Chandel a98c0dc801 Implement Email V2 with support for user-specific providers and recipient lists (#1352) 2025-10-15 09:05:42 -06:00
Aditya Chandel 54a8bacccd Add “Fit Mode” and “View Mode” options to CBX reader (#1327) 2025-10-12 01:02:01 -06:00
Aditya Chandel b3b63cce74 Add task management panel with live task status and controls (#1322) 2025-10-11 20:08:56 -06:00
Aditya Chandel 28081a1681 Add Metadata Manager for organizing and standardizing metadata (#1312) 2025-10-10 09:08:42 -06:00
Aditya Chandel f4fe96166a Support moods and tags in Bookdrop metadata picker (#1306) 2025-10-08 21:16:18 -06:00
Aditya Chandel 33a0b32b77 Fix browser freezing when downloading large files (#1304) 2025-10-08 20:25:04 -06:00
Aditya Chandel 5b16a25b47 Fix: Allow multiple users to add the same book to their shelves without errors (#1297) 2025-10-07 16:25:07 -06:00
Aditya Chandel 9d8c540eca Fix book opening issue when KOReader progress is sent (#1282) 2025-10-06 22:50:26 -06:00
WorldTeacherandWorldTeacher 93d496157e Feat: set reading status using Koreader Sync Plugin (#1275)
Co-authored-by: WorldTeacher <coding_contact@pm.me>
2025-10-06 12:58:16 -06:00
Aditya Chandel 7133ef1a69 Upgrade project environment to Java 25 and Gradle 9 (#1277) 2025-10-06 12:53:34 -06:00
Aditya Chandel 7e4a40e30c Resolve CBX page sequence issue (#1270) 2025-10-05 11:12:18 -06:00