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>