Commit Graph
161 Commits
Author SHA1 Message Date
crocodilestick 692ca19295 [bug] Error on refresh library: TypeError: NewBookProcessor.convert_book() got multiple values for argument 'end_format'
Fixes #560
2025-08-25 15:52:26 +02:00
crocodilestick 5850d6e801 [bug] E999 on sending to Kindle
Fixes #382
2025-08-25 15:51:21 +02:00
CrocodileStick 8c5fa2415a Merge pull request #518 from natabat/ingest_on_upload
Ingest on upload
2025-08-25 15:21:15 +02:00
crocodilestick 21d9dec134 Fixed ingest on upload functionality 2025-08-25 15:02:14 +02:00
Emmanuel Ferdman bf6a8996c3 Fix indentation in convert_library.py
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-08-24 11:04:57 -07:00
crocodilestick dbd04c1e64 Merge remote-tracking branch 'natabat/ingest_on_upload' into ingest_on_upload-review 2025-08-22 17:38:49 +02:00
crocodilestick ed1fb48c91 Changes to the uploads to ingest pipeline:
- 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.”
2025-08-22 12:24:27 +02:00
crocodilestick 5fbb82cd87 Fixed indentation errors 2025-08-20 09:54:33 +02:00
crocodilestick 5cdb27baaf Changed to auto_library.py to ignore sidecars ending with -wal, -shm, or -journal 2025-08-19 17:15:08 +02:00
crocodilestick 6d0eed3632 Fixed SPDX headers 2025-08-19 16:59:14 +02:00
crocodilestick 914f6c48f5 - Added an alternative/ fallback detection method to inotifywait (simple polling).
- 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
2025-08-19 16:58:41 +02:00
crocodilestick 22dcf9daf1 Made it so that cover_enforcer.py imports the helper script used for sanitizing filenames from helper.py to ensure parity between CWA script operations and the rest of the app. 2025-08-19 16:06:34 +02:00
crocodilestick 3eb87631e7 Enhance filename handling and encoding support in cover enforcer script
[bug] (special characters issue) New author subdirectory created under old author subdirectory after metadata update
Fixes #400
2025-08-19 13:17:26 +02:00
crocodilestick 91f97d46c7 Minor refactoring 2025-08-19 13:06:20 +02:00
crocodilestick b05d342db8 Made encoding more explicit at each stage to prevent potential encoding related errors 2025-08-19 12:46:04 +02:00
crocodilestick a719e14a6c SQLite stability and concurrency:
- 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
2025-08-18 12:35:12 +02:00
Aymen Djellal 8e9741f3fc Update ingest_processor.py 2025-08-15 14:18:21 -04:00
crocodilestick aa5ca82a3a [bug] Changing Capitalization for one work of an author makes links to all works of the author break
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.
2025-08-13 16:23:34 +02:00
crocodilestick cef90185df Fixed spdx header script 2025-08-12 16:36:53 +02:00
crocodilestick a978996662 Fixed [bug] Authors interface has display bugs
Fixes #298
Now on all list.html based pages, filtering elements now collapse into a drop down if there would otherwise be too many to display neatly
2025-08-12 15:56:11 +02:00
crocodilestick ae32de361e Minor refactoring and bugfixes 2025-08-11 15:55:55 +02:00
crocodilestick 2c8276c753 Incorporated the init-calibre-web-config into cwa-init and changed running order so that cwa-init runs in the place of init-calibre-web-config and svc-calibre-web-automated runs after cwa-init 2025-08-11 14:55:39 +02:00
root 72991c03d6 Add ACSM format 2025-08-10 23:15:11 +00:00
crocodilestick b2ba3bc66d Fixes #496 2025-08-10 12:42:32 +02:00
crocodilestick 4dfbcba34d Reverted unwanted changes 2025-08-09 23:42:20 +02:00
crocodilestick 2dd19f913e REFACTOR - Centralized path management by creating paths.py to replace hard-coded paths across multiple scripts 2025-08-09 22:25:38 +02:00
crocodilestick 0c891d259f REFACTOR - Moved audiobook.py, auto_library.py, auto_zip.py, convert_library.py, cover_enforcer.py, cwa_db.py, cwa_functions.py, cwa_schema.sql, ingest_processor.py & kindle_epub_fixer.py to the cps dir, changing dependencies as necessary 2025-08-09 20:21:58 +02:00
crocodilestick 0153b3cf34 REFACTOR - Moved root scripts to scripts dir 2025-08-09 19:35:22 +02:00
crocodilestick 9259658821 Fixed spdx headers 2025-08-09 16:30:04 +02:00
crocodilestick d54e34d47f Updated spdx headers to more accurately reflect the current status of the project & it's contributors 2025-08-09 16:25:35 +02:00
crocodilestick 91f727529d Added "sexy-background-blur" option to cwa-settings to give mobile dark mode users the same cover incorporated background blur effect they have on desktop (can be disabled in cwa settings) 2025-08-09 11:56:30 +02:00
crocodilestick f9a22ea94d Added system to prompt users using CWA in languages other than English that has missing translations, to help complete the translations for that language. These notifications can be disabled in the CWA settings panel 2025-08-06 16:02:42 +02:00
crocodilestick 834e2cc250 Fixed bug where compile_translations.sh wasn't executable 2025-08-04 16:57:24 +02:00
crocodilestick 7f4eb34658 [bug]No option for other languages
Fixes #475
No dutch locale after updating to version 3.1.2
Fixes #466
2025-08-04 16:54:32 +02:00
crocodilestick 3b9419a10f Added error handling for extremely long path lengths. Fixes #436 2025-08-02 23:27:25 +02:00
crocodilestick d10ba0ca4e Reversed switch from lsiown to chown as it was causing issues for some users 2025-08-02 19:10:52 +02:00
crocodilestick 02409d9450 Merge branch 'main' of https://github.com/crocodilestick/Calibre-Web-Automated 2025-08-02 17:25:43 +02:00
CrocodileStick 887b91e1d5 Merge pull request #271 from smevawala/main
Added m4b, m4a, and mp4 Audiobook support for ingest, with metadata scraping.  Tested with m4b and m4a
2025-08-02 15:13:45 +02:00
crocodilestick 80f865ed57 Fixed typo 2025-08-02 15:09:29 +02:00
crocodilestick 1c0a097f3d Fixed subprocess import errors 2025-08-02 15:08:58 +02:00
crocodilestick 584e757697 Attempting to fix some of the issues users utilising network shares have with chown by switching out chow commands for lsiown which should be more compatible. Also adding cps.py to repo which was forgotten 2025-08-02 14:50:56 +02:00
crocodilestick 553854b276 Fixed new s6 services not being execuable 2025-08-02 14:30:53 +02:00
crocodilestick 75cdfa26ca Attempt to fix permissions issues with s6 services 2025-08-02 14:08:25 +02:00
crocodilestick 73eecc175b MAJOR REFACTOR
- 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
2025-08-02 12:04:05 +02:00
smevawala 460d2a4675 Merge branch 'main' into main 2025-07-29 12:55:34 -04:00
crocodilestick 429a007e9d Fixed syntax errors and attempted to make it so that the cover display is centered in dark mode but normal in light mode 2025-07-28 23:25:51 +02:00
crocodilestick f992b9c268 Made the profile picture page / function less of a mess, finished polishing the kosync plugin page, 2025-07-27 23:54:56 +02:00
crocodilestick 6e2e489539 Fixes to plugin support, changed approach to users adding their plugins and fixes to mobile styling 2025-07-27 12:30:39 +02:00
CrocodileStick 00b795c53b Merge pull request #417 from have-a-boy/configurable-automerge
Add configurable setting for ingest automerge parameter
2025-07-24 17:53:28 +02:00
CrocodileStick 78e8452022 Merge pull request #308 from qliratu/suffix_exclude
Use replace to get the suffix only (no .)
2025-07-24 17:48:55 +02:00