Release Notes: v4.0.2
🚨 Critical Updates
These changes are essential for database stability and compatibility with Calibre 9.
- Calibre 9 Metadata Compatibility: Fixed critical UI crashes (500 errors) caused by Calibre 9's removal of
books.isbn,books.flags, andbooks.lccn.- The system now dynamically detects schema versions at startup.
- For Calibre 9+, ISBNs are now correctly pulled from the
identifierstable. - Maintained full backward compatibility for users on older Calibre versions.
- SQLAlchemy 2.x Migration Fix: Resolved
InvalidRequestErrorduring database migrations by utilizingengine.begin(). This prevents nested transaction failures when PRAGMA triggers autobegin. - Initialization Fix: Fixed a regression causing
AttributeErrorduring login. The system now ensures minimal config fields (likeconfig_books_per_page) are loaded even during background initialization.
🛠 Features & Improvements
- Route Reorganization: * Renamed the versioning page to
/package-versionsto reduce ambiguity.- Redirected legacy
/statspath to/cwa-stats-show.
- Redirected legacy
- Docker Updates:
- Updated Dockerfile to Calibre 9.0.0.
- Unified Calibre/Kepubify build arguments to ensure the UI accurately reports installed versions.
- Fork Modernization: Removed "Stock Calibre-Web" version display from admin stats as it is no longer applicable to this fork.
🐞 Bug Fixes
- OAuth Link Loop: Fixed a "UNIQUE constraint failed" error when linking an OAuth provider to an existing account.
- Hardcover Auto-Fetch: Fixed a bug where auto-fetching would ignore cancel commands and block the task queue.
- ARM Builds: Fixed network configuration issues in the ARM build workflows.
🌍 Translations & CI/CD
- Automation: Updated translation workflows to automatically commit
.poand.potfiles. - Build Flow: Translation updates now trigger dev builds automatically to keep the
mainbranch images up to date with the latest localization. - Issue #960 Resolution: Addressed a major translation regression introduced in 4.0.0/4.0.1 that caused broken UI strings across multiple languages.
- Babel Execution Fix: Switched translation scripts to use
python -m babelinvocation. This bypasses issues with broken virtual environment shebangs that were previously causing automation failures in the CI/CD pipeline.
🏗️ Build System Technicals
- Image Optimization: Updated the dev workflow to skip redundant "main push" builds when a translation build is already triggered, preventing duplicate Docker images and saving runner resources.
- Docker Cleanup: Dropped the unused
CWbase label and arguments from the Dockerfile to streamline the multi-stage build process. - Migration Testing: Added a specific "smoke test" for the database transaction pattern to ensure future schema changes don't re-introduce the SQLAlchemy
InvalidRequestError.