Commit Graph
689 Commits
Author SHA1 Message Date
acx10 91c0382527 refactor: rename package to org.booklore 2026-02-02 00:02:12 -07:00
acx10 17fef505cb Fix ebook reader text selection and audiobook reader 2026-02-01 23:49:20 -07:00
acx10 a402f98e08 Merge branch 'experimental/fix-adb' into develop
* experimental/fix-adb:
  Fix audiobook player
2026-01-31 15:56:27 -07:00
acx10 b6057588f6 Fix audiobook player 2026-01-31 15:55:42 -07:00
Balázs Szücs a27c9d57fb Fix: handle file modifications in Bookdrop event handler (#2559)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-31 14:49:58 -07:00
acx10 b215dbb692 Fix tests 2026-01-29 18:18:37 -07:00
Balázs Szücs 3a4de95c8c fix(metadata-update): ensure per-book transaction isolation in bulk updates to prevent race conditions (#2536)
Refactor bulkUpdateMetadata to process each book update in its own transaction using PROPAGATION_REQUIRES_NEW, improving concurrency safety. Add BookMetadataServiceConcurrencyTest to verify correct fetching strategy and transactional behavior.

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-29 18:00:27 -07:00
JadehawkandACX 5ad66daae6 feat(metadata) Save basic metadata to EPUB file - Bonus use Calibre Custom Columns for importing metadata. (#1879)
* feat: Add comprehensive Calibre metadata extraction system - Implemented configurable field mapping system for Calibre user_metadata - Added support for series_total custom column extraction - Pre-built mappings for ALL BookMetadata fields (20+ fields) - Added support for Set fields (tags, moods, categories, authors) - Lowercase field names with underscores (Calibre requirement) - Multiple ISBN support (ISBN-10 and ISBN-13 simultaneously) - ISBN hyphen handling (strips hyphens before validation) - Type-safe parsing (String, Integer, Float, Double, Set) - Professional logging with IDENTIFIER prefix - Added CALIBRE_FIELD_MAPPING_REFERENCE.txt documentation - Updated .gitignore and created .dockerignore for test files

* Updated gitignore

* Delete CALIBRE_FIELD_MAPPING_REFERENCE.txt

* Remove unnecessary files: example.epub and og_metadata.java

* Refactor EpubMetadataExtractor to address PR review feedback

- Eliminate DRY violations in identifier extraction with helper methods
- Fix Build-to-Check anti-pattern using processedFields tracking
- Move regex patterns to static constants to avoid recompilation
- Replace magic numbers with calculated prefix lengths
- Consolidate repetitive Set field and pagecount parsing patterns
- Remove excessive documentation and comments
- Remove unrelated .dockerignore and .gitignore entries

* chore: trigger CI/CD pipeline

* Add @Singular annotation to collection fields to support builder accumulation

* Update identifiers to URN format for Calibre compatibility

* fix: resolve MetadataChangeDetectorTest failures and enhance Calibre EPUB integration

- Fixed NullPointerException in testEdgeCase_emptyCollectionToNull_returnsTrue()

- Fixed NullPointerException in testHasValueChanges_whenEmptySetToNull_returnsTrue()

Implementing @Singular for moods and tags prevents metadata fields from being null,

which then fails edge test cases. Since we are no longer double looping during

metadata extraction, @Singular is not needed. Removing it allows the edge case

tests (by Balázs Szücs) to pass.

- Removed douban fields from persistence layer (kept in DTO for DoubanBookParser)

I was under the impression we were saving this value to the DB, but as far as I

can find, we only use Douban data for searching. Adding to the identifiers section

would raise issues with the database not having where to store that value.

Database modifications are left to the professionals.

- Added support for all identifier formats (URN and simple prefix)

Calibre only detects identifiers during IMPORT if they are in URN format.

However, it saves them back as simple prefix. Booklore now handles both.

- Added removeAllCalibreMetadata() to strip all Calibre traces

Cleans up saved EPUBs in Booklore's library, removing all Calibre metadata traces.

- Ensures clean EPUB 3 compliant output with only booklore:* tags

ALL metadata is now saved by Booklore into EPUBs using booklore:* tags.

This preserves Booklore's metadata and we can read it back during import.

Calibre support is ONLY during IMPORT, as it should be since this is the

Booklore project.

(If Calibre users want to extract Booklore metadata, they can build a Calibre

plugin to extract booklore:* tags.)

No longer use #genres or #categories. We stick to dc:subject as suggested,

and Booklore tags can be read from Calibre custom column #extra_tags.

We store tags as booklore:tags.

Removed all tests that used #genres/#categories.

Added tests to check booklore:* tags extraction.

* fix: Remove DoubanId copy helper call - upstream MetadataClearFlags missing isDoubanId()

* Fix Calibre moods and tags extraction from EPUB metadata

- Add fallback logic to check alternative key names (value, #val#) if #value# is missing

- Maintain compatibility with upstream metadata structure changes

* fix: resolve rebase conflicts and compilation errors - Fixed missing closing brace in MetadataRefreshService.java - Added MoodRepository and TagRepository to BookCreatorService - Added addMoodsToBook() and addTagsToBook() methods - Fixed EpubProcessor to use new methods

* Restore Booklore's metadata persistance, Logic Lost during Rebase + Added support for Lubimyczytac and ranobedb

Fixed lubimyczytac metadata not saving during EPUB bookdrop imports.

Root cause: The Angular bookdrop form was missing lubimyczytacId and lubimyczytacRating fields, preventing these values from being sent to the backend during finalization.

Backend fixes:

- EpubMetadataExtractor: Fixed method references with explicit lambdas for lubimyczytac field setters (ranobedb also updated preventively)

- BookMetadataUpdater: Fixed method references with explicit lambdas for lubimyczytac field updates (ranobedb also updated preventively)

Frontend fix:

- bookdrop-file-review.component.ts: Added lubimyczytacId and lubimyczytacRating form fields to createMetadataForm() and resetMetadata() methods

This ensures lubimyczytac metadata extracted from EPUB booklore:tags flows correctly through: extraction → database → UI form → backend → final book record.

* Restore Original ONLY Calibre custom column name to #pagecount So as not to break other users flow.

* fix: resolve compilation error in EpubProcessor.java - Changed bookEntity.getFileName() to bookEntity.getPrimaryBookFile().getFileName() to fix gradlew build check

* Add EPUB 3 compliant prefix declaration for custom booklore metadata

Declares the booklore: prefix in the package element's prefix attribute according to EPUB 3 specification for custom vocabularies.

* Move hardcoverBookId to standard URN identifier format

Changed hardcoverBookId from custom booklore metadata to standard dc:identifier with urn:hardcoverbook: prefix for consistency with other identifiers.

* UPDATE: migrate hardcover_book_id to VARCHAR and fix related issues

## Changes

### 1. Database Migration
- Changed hardcover_book_id column from INTEGER to VARCHAR(255)
- Supports alphanumeric book IDs from Hardcover API
- Updated HardcoverSyncService to handle String ↔ Integer conversion

### 2. Metadata Editor Fixes
- Fixed metadata change detection for provider-specific fields
- Added missing clearFlags entries: hardcoverBookId, lubimyczytacId, lubimyczytacRating
- Resolves issue where rating/review count fields wouldn't save independently

Affected fields now save properly independently:
- Amazon rating & review count
- Goodreads rating & review count
- Hardcover rating & review count
- Lubimyczytac rating
- Ranobedb rating

### 3. Web Reader Hardcover Sync (Major Fix)
Since I changed the data type for hardcover_book_id I had to update references in the HardCoverSyncService.java This turned out to reveal
the Sync Service was not fully implemented:
- Added Hardcover progress sync to ReadingProgressService
- Previously, HARDCOVER sync only worked for Kobo and KOReader devices
- Web browser reading progress now syncs to Hardcover.app

## Files Modified
- booklore-api/src/main/resources/db/migration/V107__Change_hardcover_book_id_to_varchar.sql
- booklore-api/src/main/java/.../service/hardcover/HardcoverSyncService.java
- booklore-api/src/main/java/.../service/progress/ReadingProgressService.java
- booklore-ui/src/app/features/metadata/.../metadata-editor.component.ts

## Breaking Changes
None - migration handles existing integer IDs gracefully

## Testing
- Hardcover sync tested with web reader
- Metadata editor field updates verified
- Database migration confirmed successful

---------

Co-authored-by: ACX <8075870+acx10@users.noreply.github.com>
2026-01-29 17:59:50 -07:00
PhasecoreX 09d4a3025a fix(api): Select correct Hardcover.app ISBN from lookup results (#2530) 2026-01-29 17:55:30 -07:00
Sergio Visinoni 4db2006afd test(API): add missing tests for BookMapperV2 (#2495)
* fix(API): add missing fields to BookMapperV2

This fixes a regression introduced in the data model refactoring work
for multi-format support.
BookMapperV2 was missing mapping for file-related fields.

* Added missing mappings for BookMapperV2
* Added a test for BookMapperV2 to prevent future regressions

* fix(api): fix the code after rebase
2026-01-29 17:46:14 -07:00
ACXandacx10 67269ffe4c fix(audiobook-reader): use preload=none with explicit load() for faster streaming (#2520)
* fix(audiobook-reader): use preload=none with API duration for instant load

* fix(audiobook-reader): debounce seek and limit streaming chunk size to 2MB

* no message

---------

Co-authored-by: acx10 <acx10@users.noreply.github.com>
2026-01-29 17:45:10 -07:00
acx10 17aa633b41 Backend APIs 2026-01-29 17:37:11 -07:00
acx10 2b6cc4be7c feat(mobile-api): add updatedAt to progress DTOs for conflict detection
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.
2026-01-29 14:44:38 -07:00
acx10 0c56b7b720 feat(user-stats): add monthly heatmap endpoint
- 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
2026-01-29 00:21:33 -07:00
Balázs Szücs bbea391c9c fix(metadata-refresh): filter book shelves by authenticated user (#2481)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-27 16:38:47 -07:00
Balázs Szücs 878bc44138 fix(library-processing): re-fetch library entity after clearing entity manager during rescan (#2507)
* 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>
2026-01-27 16:38:30 -07:00
Balázs Szücs 257c016f3f fix(metadata-parsers): improve ISBN search logic and fallback strategies for metadata fetching (#2502)
* 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>
2026-01-27 16:37:28 -07:00
Balázs Szücs 58bfe2293a fix(metadata-refresh): correct provider priority order and enhance REPLACE_ALL handling (#2503)
- 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>
2026-01-27 16:35:06 -07:00
Balázs Szücs 6c4934b8ba fix(metadata-match): include cover image in match score calculation and correct weight aggregation (#2513)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-27 16:29:29 -07:00
Balázs Szücs fab7c14030 fix(os_x-conversion): ignore __MACOSX directory for conversions (#2479)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-27 10:26:31 -07:00
ACXandacx10 3f334202b6 Introduce multi-format book support, including audiobooks (#2486)
* 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>
2026-01-27 10:12:50 -07:00
Sergio Visinoni bb0ee8373e fix(opds): fix regression with browsing shelves (#2423)
This fixes issue #2147 by replacing references to the legacy `additionalFiles` attribute with the new `bookFiles` one.
2026-01-23 17:06:03 -07:00
ACXandacx10 e03cca1d8c Fix 500 error in OPDS (#2434)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2026-01-23 12:18:54 -07:00
Balázs Szücs 21076d4f5d fix(scan-library): prevent NPE during rescan for books with missing file associations (#2429)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-23 10:25:31 -07:00
ACXandacx10 5d9e535a14 Fix email sending failure due to lazy-loaded bookFiles outside session (#2404)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2026-01-22 16:10:26 -07:00
ACXandacx10 2cd2e7bd16 fix(db): remove unused CBX/PDF cache cleanup cron entries (#2402)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2026-01-22 14:57:59 -07:00
ACXandacx10 eb57af85a5 Fix showstopper bugs in v1.18.0 (#2399)
- 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>
2026-01-22 13:27:06 -07:00
WorldTeacherandWorldTeacher d137055b83 fix(reading sessions): Split sessions, re-calculate times in book overview (#2393)
* do not group reading sessions on a per-day basis

* calculate actual duration for reading sessions

---------

Co-authored-by: WorldTeacher <coding_contact@pm.me>
2026-01-22 13:04:17 -07:00
ACXandacx10 cb5f6808f0 Fix failing book cover search due to HTTP 403 (#2392)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2026-01-22 00:47:36 -07:00
Balázs Szücs 14fa7b058b feat(metadata): add 'Replace When Provided' option to metadata replacement modes (#2379)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-21 22:40:40 -07:00
BAE 48b615d529 Refactor: Enhance healthcheck response with version info and DTO (#2378)
* Refactor: Enhance healthcheck response with version info and DTO

* test: Enhance healthcheck response with version info and DTO
2026-01-21 22:38:44 -07:00
Balázs Szücs c42f62c338 perf(regex): introduce regex patterns for improved string handling in various services (#2386)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-21 22:37:39 -07:00
Balázs Szücs 193c9495a1 feat(google-parser): improve Google Books API integration with improved metadata handling and series extraction (#2375)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-21 22:37:04 -07:00
boludo00andakiraslingshot 67c12223ea fix: Refactor HardcoverSyncService to improve edition and page count (#2389)
* 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>
2026-01-21 22:35:19 -07:00
cra21k 7c3c0bba01 Update KoboResources file to match Calibre web to fix issues with Overdrive login (#2367)
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).
2026-01-21 22:33:42 -07:00
Balázs Szücs b2eb303964 feat(metadata): simplify series name extraction by removing volume suffix (#2385)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-21 22:32:46 -07:00
ACXandacx10 9dc5110169 Normalize book progress percentage rounding (#2359)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2026-01-20 09:57:59 -07:00
Balázs Szücs 5451bb470a feat(metadata): add replace mode option for metadata fetching (#2356)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-20 09:21:50 -07:00
Balázs Szücs 66dee6d7e0 feat(comicVine): improve comic metadata structure with additional credits and fields (#2358)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-20 09:05:14 -07:00
Balázs Szücs 691845adb8 feat(custom-covers): add functionality to generate custom covers for selected books (#2355)
* 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>
2026-01-20 08:56:18 -07:00
Balázs Szücs 4e27b8afab feat(library): add validation for library path accessibility during rescan (#2347)
* 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>
2026-01-20 08:48:54 -07:00
ACXandacx10 7efb0e138d Implement streaming EPUB reader with on-demand loading (#2350)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2026-01-19 18:07:57 -07:00
Balázs Szücs da83a70281 fix(PathPatternResolver): remove leading slash from resolved pattern if first component is empty (#2339)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-19 08:50:45 -07:00
AJ Banck c7fa64c045 fix(epub): add cover extraction fallback using meta cover attribute (#2310)
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
2026-01-19 08:47:06 -07:00
69c3c88375 Feat/komga api (#2071)
* 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>
2026-01-19 08:44:53 -07:00
acx10 ca8ace3759 Add global and per-book settings for the streaming PDF reader 2026-01-18 23:30:40 -07:00
ACXandacx10 a39043c2a0 Revamp streaming PDF reader to render pages on demand (#2332)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2026-01-18 22:38:19 -07:00
Balázs Szücs f1f16a98d8 fix(amazon-parser): handle Amazon error responses and improve error logging (#2294)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-18 18:20:31 -07:00
Balázs Szücs a0f4c8e43e feat(hardcover): implement book details response and search service enhancements (#2303)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-18 18:19:58 -07:00
Balázs Szücs 0a3c6d72fa fix(metadata): ensure authors/genres are replaced, not merged, during metadata update by defaulting mergeCategories to false (#2304)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2026-01-18 18:19:13 -07:00