- Instead of writing directly into the library, uploads are saved safely into the ingest folder and a background worker imports them (prevents import of incomplete files)
- Files are first saved with a temporary suffix and then atomically renamed to avoid partial/corrupt reads.
To prevent dupes & handle uploading a new format to an existing book:
- Added a simple “sidecar” instruction file next to the upload so the ingest worker knows to attach that file to the correct book (no duplicate books).
Maintain Google Drive sync:
- After a successful import or add‑format, we trigger the same GDrive sync used after metadata edits (only if GDrive enabled).
Added a little UX polish:
- Invalid new uploads now redirect to the home page; empty upload posts return “400 Bad Request.”
- Polling will also be used when NETWORK_SHARE_MODE is enabled as it has better reliability with shares and using polling over inotify can be activated manually by passing the CWA_WATCH_MODE: "poll" env variable
- If the user reaches max_user_watches limit, the cwa-ingest-service & metadata-change-detector processes will now dynamically fallback to polling
[bug] Synology - hitting inotify.max_user_watches limit
Fixes#311
[Feature Request] Skip actions on read-only data
Fixes#229
- Added connection timeouts everywhere:
SQLAlchemy engines: connect_args={'timeout': 30}
sqlite3 direct connects: timeout=30 across scripts
- Enabled WAL mode on local disks and made it conditional via an environment flag.
-Added small retry/backoff in read-only UI probes to tolerate transient “database is locked.”
Increased Network share support (NFS/SMB):
- Introduced NETWORK_SHARE_MODE to disable WAL and suppress permission-changing operations that can break on network filesystems.
- Suppressed recursive chown when NETWORK_SHARE_MODE is true:
Python:
scripts/auto_library.py: skip chown for /config and /calibre-library during app.db/new library setup
scripts/ingest_processor.py: skip chown of library in set_library_permissions
scripts/convert_library.py: skip chown of convert-library.log; skip library chown
scripts/kindle_epub_fixer.py: skip chown of epub-fixer.log
cps/updater.py: disable os.chown during updates when flag is enabled
Shell:
scripts/setup-cwa.sh: guard chown of /etc/s6-overlay
root/etc/s6-overlay/s6-rc.d/cwa-init/run: guard initial chown of /config and cps/cache; guard requiredDirs loop
Documentation and configuration:
- README: Added “Network shares and SQLite WAL mode” section; documented that NETWORK_SHARE_MODE disables WAL and chown behavior for safety on network shares.
- docker-compose.yml and docker-compose.yml.dev: Exposed NETWORK_SHARE_MODE (default false) in environment.
Fixed a minor YAML indentation issue during compose edits.
Impacts on the Project:
- Fewer “database is locked” errors due to timeouts, gentle retries, and WAL on local disks.
- Safer behavior on NFS/SMB: WAL disabled and chown suppressed when NETWORK_SHARE_MODE=true.
- Clearer guidance for users via README and compose templates.
[bug] chown failed
Fixes#175
Calibre-Web-automated [bug]
Fixes#530
Fixes#481
Problem: When editing book metadata (either in bulk, inline, or through the full-page editor), the function to update the book's directory structure on the filesystem (update_dir_structure) was called multiple times in quick succession or for each book in a selection. This created a race condition, leading to errors and inconsistent folder structures.
Solution: The editing functions in editbooks.py (edit_selected_books, edit_book_param, and do_edit_book) were refactored. The new workflow ensures that all database-level metadata changes are collected and staged first. Only after all changes are ready is the filesystem update function called a single time. This atomic operation prevents race conditions and ensures the directory structure accurately reflects the final state of the metadata.
[bug] Failing to update metadata due to filepath mismatch
Fixes#519
Problem: The cover_enforcer.py script, which processes metadata change logs, failed to correctly parse log entries for books with multiple authors (e.g., "Author One & Author Two"). It would use the entire string as the author's name, leading to incorrect directory paths and "File Not Found" errors.
Solution: The script was modified to correctly handle multi-author strings. It now splits the author field by the " & " delimiter and uses only the first author to construct the directory path, mirroring Calibre-Web's default behavior.
- The CWA repo now contains all of the core required files it needs & no longer directly uses the latest Calibre-Web releases & linuxserver/docker-calibre-web repo to build it's images
- This change should hopefully make contributing to the project much more intuitive for those interested as well making CWA easier to develop for in general
Bugfixes:
- Fixed typo in amazonjp.py preventing it from working