Add updatedAt timestamp field to EpubProgress, PdfProgress, and CbxProgress
DTOs to support progress conflict detection in the mobile app.
The mobile app uses this timestamp to detect when progress has changed on the
server (e.g., from reading in the web UI) while the app was offline with
local progress, enabling automatic conflict resolution.
- Add GET /api/v1/user-stats/heatmap/monthly endpoint for month-based data
- Keep original /heatmap endpoint unchanged for backward compatibility
- Add findSessionCountsByUserAndYearAndMonth repository method
- Add getSessionHeatmapForMonth service method
* fix(library-processing): re-fetch library entity after clearing entity manager during rescan
Ensure the latest library entity state is retrieved after clearing the entity manager in rescanLibrary. Add test to verify fresh entity is used for subsequent processing.
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* test(library-processing): update rescan test to verify grouping service usage and remove obsolete assertions
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
---------
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* fix(metadata-parsers): improve ISBN search logic and fallback strategies for metadata fetching
- Update GoogleParser, HardcoverParser, and ComicvineBookParser to prioritize ISBN search and implement robust fallbacks to title+author and title-only queries
- Refactor GoogleParser to allow dependency injection for HttpClient and Jsoup connections, improving testability
- Enhance HardcoverParser to retry with title-only search if combined title+author results are filtered out
- Adjust MetadataRefreshService to prefer ISBN-13 over ISBN-10 when building fetch requests
- Add JsoupConnectionFactory and DefaultJsoupConnectionFactory for injectable Jsoup connections
- Expand and improve unit tests for GoogleParser and HardcoverParser to cover new fallback behaviors
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* fix(google-parser): handle null primary file and correct search term return
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
---------
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
- Update provider priority logic to ensure P1 > P2 > P3 > P4 for all metadata fields
- Refactor buildFetchMetadata to accept existing metadata and preserve fields when using REPLACE_ALL mode
- Adjust service and test method signatures for new parameter
- Add unit test to verify provider priority order
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
* fix: support reading alternative book formats using bookType query param
* feat: add streaming reader support for alternative EPUB formats
* refactor: extract tabs section into MetadataTabsComponent
* feat: implement per-file reading progress tracking
* feat: add configurable format priority with cascading fallback
* refactor: redesign library creator with single-page layout
* refactor: unify reading progress into ReadingProgressService
* refactor: improve delete options with clearer file format and book deletion
* refactor: improve book format matching with normalization and fuzzy fallback
* feat: add folder-based audiobook support with ZIP downloads and preparing state
* fix: display unique format types in metadata viewer
* refactor: auto-attach files to single book in folder during rescan
* feat: implement folder-centric book file grouping with fuzzy matching
* refactor: consolidate book grouping with organization mode support
* fix: use folder hash for folder-based audiobooks in auto-attach
* fix: delete only BookFileEntity on file removal, not entire book
* fix: set folderBased flag and correct file size for auto-attached audiobook folders
* fix: use count query to avoid lazy initialization in file delete handler
* fix: preserve book metadata when file is moved by detecting hash match
* fix: skip books with no files in restoration to avoid NPE
* fix: round all progress percentages to one decimal place before sending to UI
* style: improve library creator dialog spacing and layout
* fix: migrate FOLDER_AS_BOOK to BOOK_PER_FOLDER for backwards compatibility
* fix: FileMoveService now handles multi-file BookEntity properly
* style: redesign metadata-picker and file-mover UI components
* style: redesign file-naming-pattern UI and improve theme contrast
* style: relax spacing in library-creator component
* style: tighten directory-picker layout for consistency
* fix: PathPatternResolver now respects folderBased flag for audiobooks
* style: move checkmark column to left side and add pending status in file-mover
* refactor: consolidate BookFileType into BookType and add audiobook styling
* feat: show 'Continue Reading' button for in-progress books
* fix: preserve dots in folder names during grouping and prevent duplicate attachments
* style: reduce gap between download-all button and primary file section
* style: shorten 'Continue Reading' button to 'Read' on mobile
* feat: add DISK_TYPE config to disable file moves on network storage
* style: standardize settings pages with shared styles and consistent spacing
* style: revamp settings pages with modern card-based layouts
* style: revamp OPDS, auth, and task management settings layouts
* fix: update FileMoveService tests to include AppProperties parameter
* fix: derive BookFileType from extension when uploading additional book files
* feat: show format type and size in download button with dropdown for alternatives
* feat: add audiobook streaming player with HTTP Range support
* feat: add M4B chapter extraction and chapter navigation
* feat: add audiobook bookmarks and sleep timer
* refactor: split AudiobookReaderService into focused services
* feat: add Media Session API for background audio playback
* feat: display file extensions in format tags with distinct colors and add audiobook upload support
* feat: require bookFileId for viewer settings API
* fix: show split button for audiobooks with readable alternatives
* feat: improve reading sessions table with book type badges and better formatting
* feat: add audiobook play button in files tab
* feat: use file extension for format display and meaningful tab values
* feat: add extension field to BookFile DTO
* feat: use extension field for book card format pill
* fix: use mixed orientation for format priority drag-drop to support multi-line layout
* feat: add attach book files feature to consolidate single-file books
* fix: increase drag handle size for format priority chips
* fix: add missing BookFileRepository mock to BookServiceDeleteTests
* feat: add delete buttons to files tab and move shelf to other items menu
* feat: add physical books support for cataloging books without digital files
* refactor: redesign icon-picker component with improved styling
* refactor: redesign metadata-picker component with improved layout and alignment
* refactor: move Add Physical Book to top of library menu
* refactor: use p-autoComplete for authors/categories in add-physical-book dialog
* feat: add square cover search and display support for audiobooks
* fix: navigate to first page when opening unread ebooks
* fix: exclude API requests from service worker interception
* feat: support fileless books with automatic file attachment
* fix: bypass service worker for audiobook streaming requests
* refactor: remove alphabetical filter sorting, default to count, limit filters to 100
---------
Co-authored-by: acx10 <acx10@users.noreply.github.com>
- 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>