- Fix issue with hardcover toggle not being selectable
- Resolve syncing problem with Booklore toggle
- Address CSS warnings for cleaner styling
Co-authored-by: acx10 <acx10@users.noreply.github.com>
* do not group reading sessions on a per-day basis
* calculate actual duration for reading sessions
---------
Co-authored-by: WorldTeacher <coding_contact@pm.me>
* fix: Refactor HardcoverSyncService to improve edition and page count fetching logic. Always fetch edition and page info from Hardcover when a stored book ID is available. Update variable names for clarity and ensure fallback mechanisms are in place for missing data.
* fix: Update key in HardcoverSyncServiceTest to reflect correct edition ID naming convention
* feat: Enhance reading progress tracking in HardcoverSyncService by adding isFinished parameter to upsert methods. This allows for recording completion dates when a book is finished.
---------
Co-authored-by: akiraslingshot <akiraslingshot@gmail.com>
Made changes to some flags, and noticed others had broken links or http request which is fixed to be https.
Changes
New Endpoints: Added ereaderdevices (v2 device feeds) and subs_plans_page (Kobo Plus plans).
Feature Flags: Enabled kobo_superpoints_enabled (previously False).
Security & Protocol: Updated image_host, help_page, and book_detail_page_rakuten to enforce https:// (previously http or protocol-relative).
* feat(custom-covers): add functionality to generate custom covers for selected books
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(book-menu): add option to generate custom covers in metadata menu
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
---------
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(library): add validation for library path accessibility during rescan
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(BookMapper): add mappings for primary file attributes in BookMapper
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
---------
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
Add fallback mechanism to extract EPUB cover images when the primary
epub4j getCoverImage() method returns null. The new fallback reads
the 'cover' meta attribute from EPUB metadata and uses it to look up
the cover resource by ID.
This improves cover detection for EPUBs that use the traditional
<meta name="cover" content="image-id"/> and the cover image href
uses a URL-encoded special character which epub4j can't resolve.
Changes:
- Add cover extraction fallback via getMetaAttribute("cover")
- Add null safety check for coverId before resource lookup
- Add test with URL-encoded href to verify proper path handling
* Implement Komga API endpoints with OPDS authentication
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* Add database migration and documentation for Komga API
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* Address code review comments - improve performance and maintainability
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* chore: update with main develop
* chore: log cleanup
* chore: fixed switch with missing types
* chore: missing case
* Merge pull request #4 from farfromrefug/copilot/fix-500-error-on-books-api
Fix NPE in Komga books API when pageCount is null and add unpaged parameter
* Add collections endpoint and page download with PNG conversion support
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* Address code review feedback for better resource management and error messages
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* Fix convert parameter to match specification (convert=png)
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* chore: renamed migration
* chore: migration
* chore: migration fix
* chore: should work now
* chore: settings
* chore: working with mihon
* Initial plan
* Add clean query parameter for Komga API endpoints
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* Address code review comments - remove unused imports and add @Primary annotation
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* Add demo test to illustrate clean mode effectiveness
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* Support both ?clean and ?clean=true syntax
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* Filter out empty arrays in clean mode
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* chore: missing field
* chore: missing field
* chore: fix error with missing number
* fix: added groupUnknown API parameters to sort by "Unknown Series" (true by default)
* Initial plan
* Convert groupUnknown from query parameter to Booklore setting
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* Remove unused groupUnknown variables from service and mapper
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* chore: fix seriesTitle in ungrouped unknowns
* Initial plan
* Optimize Komga API performance for series listing
- Optimize getAllSeries to only convert series on current page to DTOs
- Optimize getBooksBySeries to fetch books only once (not twice)
- Add database query methods for future optimizations
- Update tests to work with new optimizations
- All existing tests pass
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* Clean up unused database query methods in BookRepository
Remove unused optimization queries that don't align with application-level series grouping logic
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* Optimize getAllSeries to query distinct series names from database
- Add database queries to fetch distinct series names directly (no need to load all books)
- Add queries to fetch books only for specific series (when building DTOs)
- Support both groupUnknown=true and groupUnknown=false modes
- Add test to verify optimization works and books aren't loaded unnecessarily
- Performance improvement: For 1000+ books grouped into 100+ series, now only queries series names (~100 rows) instead of loading all books (~1000+ rows), then loads books only for the current page (~20-50 books per series on page)
Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>
* chore: migration fix from merge
* chore: address comments
* fix: handle getBookPage for PDF/CBX
* chore: rename migration
* chore: komga specific series queries fix
* chore: komga tests fix
* chore: front end komga tests
---------
Co-authored-by: Aditya Chandel <8075870+adityachandelgit@users.noreply.github.com>
Co-authored-by: ACX <8075870+acx10@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* part1 fix: reading days show duration
* part2 fix: Fix time formatting in favorite days chart
---------
Co-authored-by: WorldTeacher <coding_contact@pm.me>
* Implement Public Shelves
Multiple changes to support shelves being marked as public.
- **Backend:**
- Added 'isPublic' field the Shelves
- Made it so that when looking for shelves it includes public ones
- Allow admins to mark shelves are public
- Added 'bookCount' to 'Shelf' so it shows for public shelves as
well
- Added 'canReadShelf' to 'SecurityUtil' for checking read access to
public shelves.
- Updated ShelfController to use this for getting shelf data
- **Frontend:**
- Updated Shelf to include 'publicShelf', 'userId', and 'bookCount'
- Updated components to allow admins to toggle shelf visibility.
- Modified 'ShelfService' to:
- Add 'getBooksOnShelf' method to fetch books from the API.
- Update /getBookCount' to use 'Shelf.bookCount' for non-owners.
- Restricted edit/delete options to shelf owners.
* Renumber Add_is_public_to_shelf.sql
Conflicted with another
---------
Co-authored-by: ACX <8075870+acx10@users.noreply.github.com>
* feat(shelf): add shelf filtering options and integrate into book processing
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* fix(book-rule-evaluator): normalize array values to lowercase for rule comparisons
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(filter): enhance library and shelf filtering logic for 'or' and 'and' modes
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(shelf): implement support for multiple shelf IDs in book retrieval and filtering
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
---------
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(metadata): add auto-save metadata feature in editor settings
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(reader-preferences): add autoSaveMetadata property to user preferences
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* feat(user-service): add autoSaveMetadata property to user preferences in tests
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
---------
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* refactor(book): extract file-specific information from book
First commit in a series aimed at refactoring the data model for books.
More specifically, the idea is to extract all file-specific information
from the `book` table and move it to the `book_file` table, previously named `book_additional_file`
The aim is to make it easier to:
* Improve support for books with multiple file formats (PDF, EPUB, etc) for all interactions (Read, Download, etc)
* Support for merging/unmerging books
* Add support for additional file types
* Specify preferred formats at the user level
Ref: #489
* refactor(book): ensure the API build and runs
Further work on the refactoring aimed at separating file-related details
from the `book` table.
With this commit all the missing changes that were prventing the API to build
or to book have been addressed.
TODO: test extensively, adjust existing unit tests and add new ones
* fix(read): add mapping for book format
This restores the read functionality which relies on the book format field
to decide which reader to use.
* fix: fix read, dowload and file upload
This commit fixes multiple issues either caused by the refactoring or pre-existing:
* Fix the Read button behaviour after the refactoring
* Unregister the watcher process when uploading additional formats
* Fix downloading of additional book formats (using the wrong ID)
* fix: adjust tests to use the new BookFileEntity class
All the tests that used to fecth file information from BookEntity
now need to get them from the relevant BookFileEntity
* fix: do not rely on AdditionalFileType
* Use the BookFileEntity bookFormat instead
* fix: use the relevant BookFileEntity class
* fix: call the right methods
* fix: Add missing mapping for the test
* fix: adapt the test to the new semantics
All book files, including the primary one, are treated as equal now.
The tests needs to take that into account when checking for additional
formats.
* fix: use mutable lists
* fix: fix syntax for droppung unique constraint
MariaDB uses indexes, not constraints
* fix: regression on book file ordering
We want to make this refactoring 100% compatible with the current behaviour (modulo a few bugs),
therefore we need to maintain the right order to ensure the "primary" book stays the same
after the migration.
* fix: allow download of supplementary files
* fix(opds): replace removed additionalFiles entity graph with bookFiles
- Update BookOpdsRepository @EntityGraph paths to use BookEntity.bookFiles after the refactor
- Add @DataJpaTest to validate BookOpdsRepository wiring and catch invalid EntityGraph attributes
- Add H2 as testRuntimeOnly dependency so the JPA slice test can run with an embedded DB
* chore(bookdrop): mount bookdrop folder from a local directory
It's consistent with the library dir, and makes debugging easier
when working on the local environment
* fix: rename migration after rebase
It's no longer 66, bumped to 73
* fix: handle BookEntity primary file NPEs after rebase
Adjust tests to always instanciate BookFileEntity when manipulating
BookEntity.
* chore: rename migration to avoid conflict
V73 is already taken on develop, V67 was left "unused"
* chore: rename again to ensure it's applied
* fix: make sure to flush the data to DB
Without the flush there is a high chance of leaving the DB in an inconsistent
state after a book move.
* fix: move all files belonging to a book
This fixes a pre-existing bug which has some nasty ramifications.
We never moved "additional files" when changing library for a book entity,
causing them to become effectively "unreacheable" from the UI.
* fix(migration): remove the unique index before importing data
* fix: fix build and test after rebase
* fix(migration): drop legacy table
* fix(upload): use the templetized name when storing on DB
* fix(rebase): Add logical fixes post rebase
* Adapt the code to properly handle the new `archive_type` field and logic
* Bump the version number for the DB migration
* Use `getPrimaryBookFile()` whenever trying to access book files
* fix(migration): Handle additional book formats
* Add support for FB2 files
* Corretly handle cb7 files as CBX
* fix(file mover): fix a regression when moving books across categories
The previous approach would trigger the JPA's `orphanRemoval` parameter on the
bookEntities, effetively triggering a delete on the DB.
This caused files to be moved but the data on the DB would get stale, also causing
additional formats to be treated as separate books upon a rescan.
* fix(rescan): do not delete alternative files on rescan
Upon library rescan, additional files such as images were removed from
book entities association when using the "Each file is a book" library structure.
* fix(metadata): fix LubimyczytacId and LubimyczytacRating not appearing with metadata refresh
* fix(metadata): remove searching by ISBN on lubimyczytac.pl (not supported)
* fix(metadata): add retries for lubimyczytac.pl
---------
Co-authored-by: ACX <8075870+acx10@users.noreply.github.com>