* feat: add kobo reading progress sync
* fix: remove old variable references
* fix: avoid changing koreader behaviour
* fix: resolve typo in koreader progress
* fix: remove link between booklore progress and kobo sync progress
* feat: add unit tests for kobo reading status sync
* fix: remove unnecessary conversion value for kobo progress
* fix: resolve issue with kobo_progress beiong optional in template
* fix: update entitlement to provide existing reading progress back to kobo on sync
* fix: use stored bookmark before creating new bookmark
* fix: update default thresholds to full numbers. kobo doesn't report progress with any decimal places
* chore: update unit tests
* fix: remove decimal places in kobo settings progress threshold
* Autocomplete for publisher and series on book metadata edit screen
* Add autocomplete to bulk edit metadata form
* seriesName was missing the [disabled]="clearFields.seriesName" attribute
---------
Co-authored-by: Aditya Chandel <8075870+adityachandelgit@users.noreply.github.com>
Adds a checkbox to the create/edit magic shelf dialog to set the shelf
as public.
If public then it shows up for all users.
Only admins can edit public shelves (edit options disabled for
non-admin)
* 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
* 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>
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
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.
- 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>
- 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>
- 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>
* 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>
* Replace 'Missing Cover' image with a generated SVG
Instead of showing the 'Missing Cover' cover image, generate one using
SVG. Split title/Author into words/10 characters manually since SVG
doesn't support word-wrap
* Styling for the generated cover