Repository navigation
Releases
Releases · Saetron/grimmory-proxy
v1.12.2
Fixed
- Client Settings Payload Type Coercion: Enabled flexible scalar and JSON object coercion in
ClientSettingUserUpdateDto,ClientSettingGlobalUpdateDto, andClientSettingDto(handling numeric values like theme indexes, booleans, nulls, and nested dicts), resolving HTTP 422 Unprocessable Entity errors and connection flickering in clients like MangaBox.
v1.12.1
Added
- Dependabot Documentation Tracking: Created
docs/requirements.txtand configured.github/dependabot.ymlto automatically monitor and update Zensical and documentation dependencies. - Interactive OpenAPI Reference & Static Export: Added
docs/openapi.json(exporting all 129+ Komga and Admin WebUI endpoints),docs/scalar.html(interactive search and exploration via Scalar API Reference), anddocs/api-reference.mdintegrated directly into the Zensical documentation site. - Full-Stack Deployment & Reverse Proxy Guide: Added
docs/deployment.mdanddocker-compose.stack.example.ymldetailing production multi-container setup with Grimmory, alongside ready-to-use Caddy, Nginx (with streaming buffer optimizations), and Traefik reverse proxy configurations. - Reader Client Setup Documentation: Added comprehensive setup guides in
docs/clients.mdcovering Mihon/Tachiyomi, Panels (iOS), Komic (Android/Flutter), Paperback, and Kuro Reader with connection troubleshooting and feature compatibility matrix. - Automated GitHub Release Publishing: Added step in
.github/workflows/ci.ymlto automatically create or update GitHub Releases with notes extracted fromCHANGELOG.mdwhenever a release build workflow finishes.
Fixed
- Komga LibraryDto ScanInterval Enum Parity: Fixed default and returned
scanIntervalinLibraryDtofromEVERY_6_HOURStoEVERY_6H, conforming strictly to the Komga OpenAPI specification and preventingJsonConvertExceptionenum deserialization failures in clients usingsnd.komga.client.library.ScanInterval(such as Komf and Komelia). - FastAPI Duplicate Operation IDs: Explicitly defined distinct
operation_idvalues and dedicated handlers for dual-method GET/POST endpoints (/api/logout,/api/v1/books/ondeck,/api/v1/books/latest,/api/v1/books/released), resolving duplicate OpenAPI operation warnings.
Dependencies
- Bumped
pydanticfrom>=2.14.1to>=2.14.2addressing security advisories GHSA-qpmf-fgh3-ff25 and GHSA-3r8g-cqwr-jr29. - Bumped
actions/upload-pages-artifactfrom4to5in.github/workflows/docs.yml. - Bumped
actions/deploy-pagesfrom4to5in.github/workflows/docs.yml.
v1.12 - Catalog Enrichment, Single-Book Actions & Community Standards
Added
- Single-Book Page Calculation & Read Progress Sync Controls:
- Added option to trigger page calculation for a specific book on-demand (
POST /admin/api/books/{book_id}/calculate-pagesandPOST /admin/api/calculate-pageswithbook_id). - Added option to push local reading progress for an individual book directly to Grimmory (
POST /admin/api/books/{book_id}/progress/push). - Added option to pull upstream reading progress from Grimmory for an individual book (
POST /admin/api/books/{book_id}/progress/pull).
- Added option to trigger page calculation for a specific book on-demand (
- Page Calculation Error Tracking & Book File Validation:
- Persistent Problematic Files Table (
page_calc_errors):- Automatically records calculation and inspection failures (e.g., corrupt CBZ/EPUB archives, unreadable PDFs, zero-byte downloads, or timeouts) with book ID, title, series name, library ID, format, exact file path on disk, and specific error reason.
- Prevents false-positive page counts (no longer defaults corrupted archives or zero-byte files to 1 page).
- Automatically deletes resolved error records when a book is successfully recalculated and enriched.
- WebUI Problematic Book Files Inspection Panel (
/stats):- Added dedicated "Problematic Files & Calculation Errors" panel in the Statistics & Page Engine page with instant issue badges.
- Displays detailed table including direct link to book, series name, format, disk file path in
<code>block, failure reason, and occurrence timestamp. - Added "Retry Failed Files" action to run targeted page calculation exclusively on books with recorded errors (
POST /admin/api/calculate-pageswithretry_failed_only: true). - Added "Clear Error History" action (
POST /admin/api/page-calc/errors/clear) to reset error history.
- Live Page Calculation Streaming Logs (
/logs):- Added dedicated "Page Calculation & Errors" tab in the live logs viewer, backed by an in-memory ring buffer capped at 200 lines.
- Streams inspection events, calculation successes, timeouts, and highlighted error messages in real time.
- Exposed programmatic endpoints
GET /admin/api/page-calc/errorsandPOST /admin/api/logs/clearfor page calculation logs.
- Persistent Problematic Files Table (
- Full WebUI Rework & Modular Page Architecture:
- Clean Status & Book Query Explorer Dashboard (
/admin,/dashboard):- Redesigned the primary landing dashboard to focus on overall health/sync status and an interactive book search explorer.
- Added instant, debounced book querying by title, series, or ID (
GET /admin/api/books/search) with library filtering, cover previews, and direct read links.
- Dedicated Statistics & Page Engine Page (
/stats):- Moved overall KPI cards, format distribution breakdown, storage analytics, and page calculation triggers to a dedicated
/statsinterface.
- Moved overall KPI cards, format distribution breakdown, storage analytics, and page calculation triggers to a dedicated
- Dedicated Connected Users Page (
/users):- Relocated connected reader clients and user read tracking management to a dedicated
/userspage.
- Relocated connected reader clients and user read tracking management to a dedicated
- Dedicated Live Logs Viewer (
/logs):- Created dedicated
/logsstream viewer with tabbed categories: Proxy Application Logs, Catalog Metadata Sync Logs, and User Read Sync Logs. - Capped log streams to the last 200 lines via ring buffer memory management (
RingBufferLogHandler), preventing memory bloat. - Added instant tab switching, auto-scroll toggle, auto-polling, and one-click log clearing (
POST /admin/api/logs/clear).
- Created dedicated
- Clean Status & Book Query Explorer Dashboard (
- Persistent Configuration File (
config.json) with WebUI Settings Management:- First Startup Initialization: On first launch, the proxy automatically generates a persistent
config.jsonpopulated from environment variables and defaults. - File Precedence: On all subsequent startups,
config.jsontakes precedence over environment variables, allowing persistent in-app configuration. - New WebUI Settings Menu (
/settings):- Added dedicated
/settingspage in the admin interface accessible from the header navigation. - Categorized configuration controls for Grimmory upstream connection, sync intervals, reader image compression, and storage.
- Live raw JSON viewer and editor for
config.jsonwith syntax validation. - Exposed
GET /admin/api/settingsandPOST /admin/api/settingsfor programmatic configuration management. - Dynamic runtime updates for sync loops, Grimmory URL, and reader caches without restarting the container.
- Added dedicated
- First Startup Initialization: On first launch, the proxy automatically generates a persistent
- On-The-Fly Reader Image Compression & Optimization:
- Added async
ImageCompressorservice utilizing Pillow with non-blocking execution viaasyncio.to_thread. - Transcodes large comic/book page images to WebP or JPEG on demand, reducing transfer bandwidth and page loading latency for reader clients (Komic, Panels, Mihon, Tachiyomi, Kuro Reader).
- Zero SSD Writes (In-Memory LRU Cache):
- Implemented
MemoryPageCache(defaultIMAGE_CACHE_TYPE="memory", max 150 pages) caching recently accessed compressed pages strictly in RAM. - Page flips and back-and-forth reading hit RAM cache (<1ms) without inflicting write wear on SSD storage.
- Implemented
- Smart Image Guard & Dimension Downscaling:
- Optional
IMAGE_COMPRESSION_MAX_DIMENSION(default 1920px) preserving aspect ratio using high-quality Lanczos resampling. IMAGE_COMPRESSION_MIN_SIZE_KBthreshold (default 400KB) bypassing pages that are already lightweight to conserve CPU.- Guard against negative compression (serves original if re-encoding yields larger file size).
- Robust color mode handling (CMYK conversion to RGB, alpha channel flattened against white background for JPEG).
- Optional
- Full Komga Protocol Parity:
- Supports client-driven conversion via
GET /api/v1/books/{id}/pages/{pageNumber}?convert=webp(orjpeg,png) regardless of whether global compression is enabled.
- Supports client-driven conversion via
- Admin WebUI Dashboard Controls:
- Added Reader Compression status and In-Memory Page Cache metrics to the admin dashboard.
- Added
POST /admin/api/image-compressionto toggle compression and update quality/format at runtime. - Added
POST /admin/api/image-compression/clear-cacheto immediately flush the in-memory page cache. - Hooked cache eviction into
release_memory()to free RAM during storage optimization.
- Added async
Changed
- Repository Documentation Restructure:
- Streamlined root README.md into a focused overview and quickstart guide.
- Extracted exhaustive documentation into dedicated files under docs/: docs/configuration.md (environment variables and tuning), docs/endpoints.md (Komga, Admin WebUI, and browser redirect routes), and docs/development.md (architecture, page calculation engine, testing, and CI/CD workflows).
- Book Query Explorer Streamlining:
- Removed redundant "Read" button from book cards in the WebUI Book Query Explorer.
- Completely removed user reading progress badges (
Read,p. X,Unread) from the admin dashboard to keep the interface focused strictly on catalog management and administrative operations.
- Refactored Read Progress & KOReader Synchronization:
- Consolidated
GrimmoryReadProgressRequestpayload construction (build_grimmory_progress_request) and asynchronous KOReader progress forwarding (schedule_koreader_progress_sync) inapp/services/koreader_utils.py, eliminating duplicated synchronization logic acrosskomga_progress.py,komga_books.py, andkoreader.py. - Extracted shared
_resolve_series_or_404and_clear_book_progresshelpers inapp/routers/komga_progress.py. - Unified
KNOWN_AUTHOR_ROLESconstant definition inapp/services/filter_utils.pyand reusedparse_raw_jsonacross services.
- Consolidated
Fixed
- Dashboard Action Buttons (
Sync Catalog&Refresh All): Fixed missing JavaScript handler bindings (triggerMetadataSyncandtriggerPurgeAndRefresh) inapp/static/app.jsthat prevented the top status bar buttons on/adminfrom triggering metadata synchronization or catalog purge-and-refresh. - Live Runtime Settings Propagation (
POST /admin/api/settings):- Added
GrimmoryClient.update_base_url()so updatinggrimmory_urlat runtime also updates the underlyinghttpx.AsyncClient.base_urland invalidates_sync_tokenand_sync_token_expires_at. - Updated
SyncService.start_background_loopandUserSyncService.start_background_loopto evaluatesync_interval_minutesanduser_sync_interval_minutesdynamically on each iteration instead of exiting permanently when initialized to0. - Propagated live updates for
cache_ttl,thumbnails_dir,image_cache_memory_max_items,image_cache_disk_dir, Jinja2 template globals, and root logger level when saving settings.
- Added
- Book Explorer Search by Series Name & Book ID: Fixed
Database.get_books_listsearch filtering to match series name (s.name LIKE ?) and exact numeric book ID (b.id = ?) in addition to book title, and fixedfile_size_kbfield mapping inGET /admin/api/books/search. - Series Metadata Backfill Author Upsert: Fixed
ON CONFLICT(library_id, name, role)target inDatabase.connect()series metadata backfill migration to match the composite primary key of theauthorstable. - Test Suite HTTPX Cookie Deprecation Warnings: Updated
AsyncClientinstantiations in test suites to passcookiesat client initialization rather than per-request, eliminating allDeprecationWarningemissions.
Dependencies
- Bumped
fastapifrom>=0.158.1to>=0.162.0. - Bumped
pydantic-settingsfrom>=2.16.1to>=2.16.2. - Bumped
pypdffrom>=6.21.2to>=6.21.4. - Bumped
pytestfrom>=9.1.1to>=9.2.0. - Bumped
pytest-asynciofrom>=1.4.0to>=1.4.1.