* fix(opds): add mime type support for FB2 and CBX formats based on file extension
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* fix(opds): return correct MIME types for all supported book formats in feed links
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* fix(opds): remove incorrect MIME type mapping for DJVU and default fallback
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* test(opds): add unit tests for correct MIME type mapping in catalog feed generation
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
---------
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* fix(cbz): exclude macOS metadata and hidden files from image extraction
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* refactor(cbz): restrict isContentEntry method visibility to private in CbxReaderService
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* test(cbz): add unit tests for macOS metadata file exclusion in CbxReaderService
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
---------
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* fix(upload): preserve original filename as title when metadata extraction returns temp file name
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* fix(upload): set original filename as title directly when extracted title is temp name
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
---------
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: add LubimyCzytac metadata provider
- Add LubimyCzytac parser with web scraping for lubimyczytac.pl
- Extract book metadata including title, authors, description, ratings
- Parse JSON-LD structured data for reliable metadata extraction
- Add database migration with columns and JSON property name updates
- Add comprehensive test coverage for parser
* feat: add LubimyCzytac UI integration
- Add LC ID and LC Rating fields to metadata picker
- Update settings page with Lubimyczytac provider toggle
- Add LubimyCzytac to metadata searcher provider list
- Display Lubimyczytac in all metadata viewer sections
- Add Lubimyczytac to advanced fetch options
- Update TypeScript models to match backend serialization
* Fix(metadata): Don't import creators with a non-author role as author
Looks at either the meta tag for the creators or the opf role attribute
to determine the role of a creator. If no role is specified its assumed
to be an author.
Also only prunes handled created roles when writing the epub data back
out to prevent clobbering any extra data that might be present in the
epub already.
* Fix(metadata): Add testcases for non-author creator handling
Just adds testcases for the previous changes to the extraction and
writer logic.
- Ensure cover image paths in EPUB manifest are URL-decoded before file access
- Update EpubMetadataExtractor and EpubMetadataWriter to handle encoded hrefs
- Add comprehensive tests for unicode and URL-encoded cover image filenames
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(bookmark): add bookmark editing, priority, color, notes, and improved sorting
- Add UpdateBookMarkRequest DTO and bookmark editing dialog/component in frontend
- Extend BookMark model/entity with color, notes, priority, updatedAt fields
- Implement bookmark update API and service logic with validation
- Sort bookmarks by priority and creation date
- Add Flyway migrations for new columns and index
- Update tests for new bookmark features
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* fix(bookmark): prevent notes length display error in edit dialog
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* fix(bookmark): reset editing state and improve dialog cancel handling
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* fix(bookmark): improve edit dialog template with Angular @if and conditional error display
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(bookmark): add view dialog, search, and improved display for bookmarks in reader
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(bookmark): redesign bookmarks section UI with improved layout, styling, and interactions
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(bookmark): enhance view dialog UI with improved layout, styling, and priority display
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* chore(migration): rename migration files to maintain sequential versioning
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(bookmark): add view and edit actions to bookmark list with improved UI and tooltips
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(bookmark): add search and filter functionality to bookmark list in EPUB reader
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(bookmark): update search input to use PrimeNG IconField and InputIcon components
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
---------
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* fix: ensure book metadata is eagerly loaded for updates and rescans
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* Fix failing tests in LibraryRescanHelperTest and MetadataControllerTest
- Update LibraryRescanHelper to handle null and deleted books gracefully during rescan.
- Update LibraryRescanHelperTest to mock BookRepository correctly.
- Update MetadataControllerTest to mock findAllWithMetadataByIds.
---------
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat: add hardcover API key and sync settings to KoboSync and KoboUserSettings entities
* feat(hardcover): enhance sync functionality to use per-user API keys
- Updated HardcoverSyncService to utilize user-specific Hardcover API keys for syncing reading progress.
- Modified syncProgressToHardcover method to accept userId, allowing for personalized sync settings.
- Improved logging to include userId in sync operations for better traceability.
- Adjusted KoboReadingStateService to pass userId when triggering sync to Hardcover.
* feat(database): update kobo_location_source column size and add hardcover settings
- Increased the size of the kobo_location_source column to accommodate longer location strings from Kobo devices.
- Added new columns for hardcover API key and sync settings in the kobo_user_settings table to enhance user customization.
* refactor(hardcover): update tests to use user-specific Kobo settings
- Replaced AppSettingService with KoboSettingsService in HardcoverSyncServiceTest to utilize user-specific settings.
- Modified syncProgressToHardcover method calls to include userId for personalized sync operations.
- Added a new test case to handle scenarios where user settings are not found, ensuring robust error handling.
---------
Co-authored-by: akiraslingshot <akiraslingshot@gmail.com>
* feat: add cover image auto cropping when oversized
* feat: add smart cropping to ignore sections of constant colours in cover images
* fix: description implied cbx files would be excluded from cover regeneration when they are not
* feat: add options to bulk edit cover images in the library view
* fix: resolve issues with batching requests and data validation for cover images
* feat(hardcover): sync Kobo reading progress to Hardcover
- Add HardcoverSyncService to sync reading progress asynchronously
- Store hardcover_book_id in book_metadata for faster lookups
- Integrate with KoboReadingStateService to trigger sync on progress updates
- Add database migration for hardcover_book_id column
* test(hardcover): add unit tests for HardcoverSyncService
* test(hardcover): add HardcoverSyncService mock to unit tests for improved coverage
* refactor(hardcover): update syncProgressToHardcover method to use book ID
- Changed syncProgressToHardcover to accept book ID instead of BookEntity.
- Integrated BookRepository to fetch BookEntity within the method.
- Updated related unit tests to reflect the new method signature and ensure proper functionality.
* feat(hardcover): enhance HardcoverSyncService with edition lookup and logging
- Added a method to find an edition by ISBN, improving the accuracy of edition information.
- Enhanced logging for progress calculations, search responses, and reading progress updates for better traceability.
- Updated the handling of default edition IDs to ensure correct page counts are used when available.
* feat(metadata): add hardcoverBookId and its locking mechanism
- Introduced hardcoverBookId and hardcoverBookIdLocked fields to MetadataClearFlags, BookMetadata, and BookMetadataEntity.
- Updated BookMetadataUpdater to handle locking for hardcoverBookId.
- Enhanced MetadataChangeDetector to compare changes for hardcoverBookId, ensuring proper metadata management.
* feat(metadata): add hardcoverBookId input and display in metadata dialogs
- Introduced hardcoverBookId input field in the metadata editor with locking mechanism.
- Updated metadata restore dialog to display hardcoverBookId when available.
- Enhanced user interface for better metadata management and visibility.
* feat(metadata): integrate hardcoverBookId across components and forms
- Added hardcoverBookId and hardcoverBookIdLocked fields to relevant models and interfaces.
- Updated metadata editor, picker, and review components to include hardcoverBookId input and locking functionality.
- Enhanced form controls and metadata handling to support the new hardcoverBookId feature for improved user experience.
* feat(migration): add hardcover_book_id_locked column to book_metadata table
- Introduced a new column hardcover_book_id_locked with a default value of FALSE to the book_metadata table for enhanced metadata management.
* fix(metadata): realign html with develop
---------
Co-authored-by: akiraslingshot <akiraslingshot@gmail.com>
* fix: update path pattern resolver to better handle file extensions
* chore: add unit tests to cover the newly found edge cases
* fix: resolve issue with file extension duplication when using fallback filename
* feat: add bulk editors for bookdrop
* fix: update pattern behaviour and remove redundant frontend logic
* fix: clean up pattern extractor
* fix: create shared logic to align bulk edit and pattern extract and resolve some minor behaviour issues
* fix: date matching pattern and resolve issues with pattern matching to ignore extra trailing data
* chore: cleanup tests and code to be cleaner
* chore: cleanup autogenerated testing rules
* fix: update to use the new dialog launcher service
* fix: add boolean null check and data validation on pattern extract api
* feat: add bulk edit batching to avoid issues with extremely large import counts
* fix: adding timeout to avoid potential redos issue
* fix: add try blocks for issues with potential NumberFormatException
* fix: update isbn and asin regex to better match spec
* fix: improve error handling and logging
* fix: make component names consistent with the project
* fix: mising import for pattern syntax exception
* chore: add additional tests for the bulk edit service
* fix: improve accessibility to new ui elements
* fix: further improvements to the pattern extractor timeout
* fix: improve frontend placeholder validation
* fix: add back changes accidently removed by merge
* feat(opds): allow user to set sorting for opds feed in settings
* patch(opds): re-add search normalization
* patch(opds): add series to feedid determination
---------
Co-authored-by: WorldTeacher <admin@theprivateserver.de>
* 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>
* 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
* 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>
* 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>
* 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>
* 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
* 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>
* 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