Commit Graph

1354 Commits

Author SHA1 Message Date
Balázs Szücs
d9ff9468bd feat(cover-search): trigger search automatically when form is valid after autofill (#2035)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-29 05:28:40 -07:00
Balázs Szücs
76b2979f37 chore: remove unused imports and minor code cleanup across services, controllers, and tests (#2036)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-29 05:28:07 -07:00
acx10
d3148b3772 Fix master pipeline 2025-12-28 22:50:27 -07:00
acx10
fa4cb8e334 update domain 2025-12-28 22:42:09 -07:00
Marcin Gajewski
dfcd9db368 Feat/lubimyczytac metadata provider (#2019)
* 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
2025-12-28 19:50:53 -07:00
Balázs Szücs
e65aa47552 refactor(api): improve file resource handling in book download and FB2 metadata extraction (#2018)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-28 19:40:12 -07:00
ACX
01446c2537 Refactor book service in BE and FE (#2013)
* Refactor book service in BE and FE

* Add missing method

---------

Co-authored-by: acx10 <acx10@users.noreply.github.com>
2025-12-28 19:37:35 -07:00
ACX
60095c2173 Tele BE (#2026)
* WIP

* Tel BE

---------

Co-authored-by: acx10 <acx10@users.noreply.github.com>
2025-12-28 18:49:43 -07:00
ACX
9e151010e7 Improve the SVG fetching and caching logic (#2011)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2025-12-27 15:26:11 -07:00
acx10
81757317e5 Some chart shuffles 2025-12-27 11:53:53 -07:00
ACX
3fc4d08def Fix: Custom/Added icons not visible when assigning shelf (#2010)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2025-12-27 09:37:00 -07:00
acx10
71617a77ff Misc. layout fixes 2025-12-26 18:32:31 -07:00
acx10
65a439f9c1 Increase angular budget 2025-12-26 16:56:43 -07:00
descensus
fb162cb2ad Disable nginx IPv6 listener when disabled on host (#1998)
* Disable nginx IPv6 listener when disabled on host

Patch nginx.conf when host has IPv6 disabled so nginx does not fail to start.

* clarified comment
2025-12-26 16:50:11 -07:00
MightyHalfGinger
4d8092e5bc Fix(metadata): Improve handling of non-author creator roles (#1987)
* 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.
2025-12-26 16:47:24 -07:00
Balázs Szücs
87fe405455 test(util): expand and improve utility test coverage for BookUtils, FileUtils, PathPatternResolver, MetadataChangeDetector, and UserPermissionUtils (#1985)
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-26 16:45:55 -07:00
ACX
4712f53b8e Display paginated reading sessions in the book metadata view (#2003)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2025-12-26 16:44:44 -07:00
ACX
2c1e8a99e3 Add more user-specific charts (#1991)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2025-12-26 12:08:27 -07:00
ACX
ad8904550b Update github templates (#1990)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2025-12-25 21:38:09 -07:00
ACX
97cb781229 Fix Reading Session Timeline bars (#1978)
* Fix Reading Session Timeline bars

* Remove header

---------

Co-authored-by: acx10 <acx10@users.noreply.github.com>
2025-12-25 12:20:09 -07:00
farfromrefuge
5f2000f085 fix: when selecting a series, select all books from the series (#1979) 2025-12-25 11:42:30 -07:00
cwar
811a7e0906 fix(metadata): Use existing Goodreads ID for batch refresh instead of searching (#1973)
When refreshing metadata for books that already have a goodreadsId stored,
the GoodReadsParser now fetches directly from the book page instead of
performing a title search first.

Problem:
- Books with goodreadsId populated but missing goodreadsRating
- Batch refresh would search by title, ignoring the stored ID
- If search failed (rate limits, transient errors), ratings never populated

Solution:
- Check for existing goodreadsId before searching
- If valid ID exists, fetch directly from /book/show/{id}
- Fall back to search only if no ID or direct fetch fails

This ensures previously matched books get their ratings updated reliably.
2025-12-25 11:35:53 -07:00
cwar
cb91a4ae6e fix: Prevent transaction rollback when cover download fails (#1971)
Cover download failures in updateThumbnailIfNeeded() were propagating
exceptions that poisoned the @Transactional method, causing the entire
book's metadata update to roll back - even though the metadata itself
was fetched successfully.

This commonly occurs when CDNs serve WebP images with JPEG extensions/
headers (e.g., Amazon CDN), causing ImageIO to fail validation.

The fix wraps the thumbnail download in a try-catch and logs a warning
instead of propagating the exception. Cover failures are non-critical
and shouldn't prevent metadata updates from persisting.
2025-12-25 11:17:28 -07:00
Balázs Szücs
21bcc7d382 perf(cbz): optimize CBZ reading (#1980)
* perf(cbz): improve zip file compatibility by enabling Unicode extra fields and ignoring local file headers

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* feat(perf): Implement robust ZipFile optimization with fallback

Updated ZipFile reading logic in CbxReaderService, CbxProcessor, and CbxConversionService. Implemented a 'Fast Path' (Central Directory only) for speed (20x faster on large archives). Implemented a 'Slow Path' (Local Header scanning) fallback if the fast path fails or finds no images. Ensures compatibility with older or malformed archives where Unicode names are only present in local headers. Refactored extraction logic to helper methods where appropriate to support retry mechanism.

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-25 10:10:14 -07:00
farfromrefuge
f5e99d52c1 Fix: regenerate improvements (#1981)
* chore: report error on cover regeneration fail

* refactor: use RxJS forkJoin instead of Promise.all

- Replace Promise-based approach with RxJS forkJoin for better consistency
- Remove console.log debug statement
- Improve error handling with proper RxJS operators

Co-authored-by: farfromrefug <655344+farfromrefug@users.noreply.github.com>

* chore: cleanup

* chore: rework per development upstream

* chore: updating books on bulk cover regenerate

* chore: working

* chore: metadata regenerateCover pdate UI

* chore: review per comments

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-12-25 10:09:33 -07:00
Balázs Szücs
77e06b868e fix(epub-metadata): properly decode URL-encoded cover image hrefs in EPUB files (#1983)
- 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>
2025-12-25 10:05:24 -07:00
ACX
b4b4d8f492 Readme styling (#1982)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2025-12-25 00:17:19 -07:00
acx10
e85dab8580 Revert 2025-12-24 23:35:12 -07:00
acx10
b649433ec3 Update readme styling 2025-12-24 23:18:06 -07:00
ACX
776a03b890 Fix CI (#1976)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2025-12-24 12:27:24 -07:00
acx10
75fb085c87 Update github workflow 2025-12-24 00:20:08 -07:00
acx10
61dcb18706 Update github workflow 2025-12-24 00:17:42 -07:00
acx10
eaa8e46124 Update github workflow 2025-12-24 00:07:20 -07:00
acx10
85cc819369 Update github workflow 2025-12-23 23:18:21 -07:00
acx10
3586dd00dd Fix epub scroll 2025-12-23 22:56:49 -07:00
Muppetteer
36d5f9e6e0 fix: Don't log stack trace when fetching latest version fails (#1959) 2025-12-23 08:36:10 -07:00
acx10
49dabf8549 Run flyway check on dev -> master merge 2025-12-22 11:42:08 -07:00
ACX
b8fb843b7a Introduce more granular permission controls and update the user management UI (#1965)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2025-12-22 11:24:54 -07:00
ACX
b5ada2fff0 Introduce reading session tracking with visual insights (#1957)
* Introduce reading session tracking with visual insights (#1957)

---------

Co-authored-by: acx10 <acx10@users.noreply.github.com>
2025-12-21 21:14:42 -07:00
acx10
b12fc82414 Merge flyway v78 into v77 2025-12-20 22:24:14 -07:00
Balázs Szücs
645234e66f feat(bookmark): improve bookmark feature by adding rename, note, color, priority functionalities (#1946)
* 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>
2025-12-20 22:22:10 -07:00
Balázs Szücs
1b4bdc2ddb fix(scans): prevent shelf associations from being cleared during metadata operations (#1947)
* 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>
2025-12-20 14:39:09 -07:00
ACX
ab36fa4ab6 Enhance EPUB reader with new themes and UI improvements (#1948)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
2025-12-20 14:37:52 -07:00
Pedro Nave
bfa08054b5 Fix: Add missing kobo progress bar and stats (#1942)
* fix: added missing kobo progress bar from book card

* fix: added kobo progress bar to metadata viewer

* fix: consider kobo progress in stats
2025-12-19 18:59:31 -07:00
Giancarlo Perrone
32a1a2ac34 Fix/hardcover api key per user (#1943)
* 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>
2025-12-19 18:56:41 -07:00
CounterClops
54108754f9 feat: add additional cover art actions and settings (#1938)
* 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
2025-12-19 11:20:50 -07:00
Balázs Szücs
4e6842c189 refactor(fb2, misc): Improve code quality, update to modern Java patterns, add reasonable initial values for StringBuilders (#1932)
* fix(FilenamePatternExtractor): correct date format regex logic and add comprehensive tests

- Fix bug in buildRegexForDateFormat to handle single 'M' and 'd' at any position
- Add FilenamePatternExtractorDateFormatTest and FilenamePatternExtractorIntegrationTest for date extraction scenarios
- Improve StringBuilder initialization for performance in multiple classes
- Precompile regex patterns in Fb2MetadataExtractor for efficiency
- Add Fb2MetadataExtractorOptimizationTest for pattern and StringBuilder usage
- Add null check in BookFilePersistenceService.markAllBooksUnderPathAsDeleted
- Improve path validation logic in PathPatternResolver

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* test: remove unnecesary tests

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
2025-12-19 10:59:11 -07:00
Muppetteer
0767f75ddb fix: Library icon name bug (#1934) 2025-12-19 10:58:42 -07:00
ripdog
cc76501fd0 feat: add library sync URL generation in KoboUrlBuilder (#1937) 2025-12-19 10:58:17 -07:00
Giancarlo Perrone
2da01e7a2e feat(hardcover): sync Kobo reading progress to Hardcover (#1926)
* 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>
2025-12-19 10:56:40 -07:00