crocodilestick / Calibre-Web-Automated

Calibre-Web but automated and with Calibre features! Fully automate and simplify your eBook set up!
https://github.com/crocodilestick/Calibre-Web-Automated
GNU General Public License v3.0
628 stars 12 forks source link

[bug] Auto-ingest not working #106

Open mmonseurs opened 1 week ago

mmonseurs commented 1 week ago

Describe the bug Placing a book in the ingest folder does not add it to the library, even though it is deleted and the logs say it was added.

To Reproduce Steps to reproduce the behavior:

  1. Place book in ingest folder
  2. Wait
  3. See that the file is deleted but no entry in the library

Expected behavior Book is added to the library

Configuration(please complete the following information):

Additional context Had this issue before, but it concerned incorrect mapping of folders. Currently my library is mapped to calibre-library. My compose file:

services: calibre-web-automated: image: crocodilestick/calibre-web-automated:latest container_name: calibre-web-automated environment:

Logs: ============== STARTING NEW BOOK DETECTOR ============== ========== STARTING BOOKS-TO-PROCESS DETECTOR ========== ========== STARTING METADATA CHANGE DETECTOR =========== [metadata-change-detector]: Watching folder: /app/calibre-web-automated/metadata_change_logs Setting up watches. Watches established. [new-book-detector]: Watching folder: /app/calibre-web-automated/cwa-import [books-to-process]: Watching folder: /cwa-book-ingest Setting up watches. Beware: since -r was given, this may take a while! Setting up watches. Beware: since -r was given, this may take a while! Watches established. Watches established. [ls.io-init] done. [books-to-process]: New files detected - /cwa-book-ingest/forwearemany.epub [new-book-detector]: New file detected: /app/calibre-web-automated/cwa-import/forwearemany.epub ./run: line 22: /usr/bin/calibredb: No such file or directory [new-book-detector] Added /app/calibre-web-automated/cwa-import/forwearemany.epub to Calibre database [new-book-detector]: Removing /app/calibre-web-automated/cwa-import/forwearemany.epub from import folder... find: cannot delete ‘/cwa-book-ingest/’: Device or resource busy [new-book-processor]: Found epub file in ingest folder. [new-book-processor]: Moving epub file to the CWA import folder... [new-book-processor]: Moving /cwa-book-ingest/forwearemany.epub... [new-book-detector]: /app/calibre-web-automated/cwa-import/forwearemany.epub successfully moved/converted, the Ingest Folder has been emptied and is ready [books-to-process]: New files successfully moved/converted, the Ingest Folder has been emptied and is ready to go again.

jmarmstrong1207 commented 1 week ago

Could you check if you are transferring the files into cwa-ingest with those files being owned by your user? You can try the dev image here and see if that fixes it too: jmarmstrong1207/calibre-web-automated:dev

jmarmstrong1207 commented 1 week ago

I also have added a new release v2.1.0-dev-2 deprecating auto ingestion, and instead having the user press "Ingest Books" as it's not 100% reliable. If it still doesn't work, try using that version's image: jmarmstrong1207/calibre-web-automated:v2.1.0-dev-2

https://github.com/crocodilestick/Calibre-Web-Automated/releases

mmonseurs commented 1 week ago

Files are owned by me (max:max), calibre container is run as max:media.

I tried your dev image with a manual refresh, but that didn't work either. Logs:

  d8"     `Y8             IP'`Yb       IP'`Yb                                 Yb, `88     88     d8'          IP'`Yb               
 d8'   8b  d8             I8  8I  gg   I8  8I                                  `"  88     88     88           I8  8I               
,8I    "Y88P'             I8  8'  ""   I8  8'                                      88     88     88           I8  8'               
I8'             ,gggg,gg  I8 dP   gg   I8 dP        ,gggggg,   ,ggg,   aaaaaaaa    88     88     88   ,ggg,   I8 dP                
d8             dP"  "Y8I  I8dP    88   I8dP   88gg  dP""""8I  i8" "8i  """"""""    88     88     88  i8" "8i  I8dP   88gg          
Y8,           i8'    ,8I  I8P     88   I8P    8I   ,8'    8I  I8, ,8I              Y8    ,88,    8P  I8, ,8I  I8P    8I            
`Yba,,_____, ,d8,   ,d8b,,d8b,_ _,88,_,d8b,  ,8I  ,dP     Y8, `YbadP'               Yb,,d8""8b,,dP   `YbadP' ,d8b,  ,8I            
  `"Y8888888 P"Y8888P"`Y88P'"Y888P""Y88P'"Y88P"'  8P      `Y8888P"Y888               "88"    "88"   888P"Y8888P'"Y88P"'            
                     █████╗ ██╗   ██╗████████╗ ██████╗ ███╗   ███╗ █████╗ ████████╗███████╗██████╗ 
                    ██╔══██╗██║   ██║╚══██╔══╝██╔═══██╗████╗ ████║██╔══██╗╚══██╔══╝██╔════╝██╔══██╗
                    ███████║██║   ██║   ██║   ██║   ██║██╔████╔██║███████║   ██║   █████╗  ██║  ██║
                    ██╔══██║██║   ██║   ██║   ██║   ██║██║╚██╔╝██║██╔══██║   ██║   ██╔══╝  ██║  ██║
                    ██║  ██║╚██████╔╝   ██║   ╚██████╔╝██║ ╚═╝ ██║██║  ██║   ██║   ███████╗██████╔╝
                    ╚═╝  ╚═╝ ╚═════╝    ╚═╝    ╚═════╝ ╚═╝     ╚═╝╚═╝  ╚═╝   ╚═╝   ╚══════╝╚═════╝ 
                         ~~~ Based on images from linuxserver.io & Calibre-Web by janeczku ~~~

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── User UID: 1000 User GID: 1002 ─────────────────────────────────────── [custom-init] No custom files found, skipping... [cwa-init-remove-locks] Checking for leftover lock files from prvious instance... [cwa-set-perms] Recursively setting ownership of everything in /config, /calibre-library, /app/calibre-web-automated to abc:abc... [cwa-init-remove-locks] No leftover lock files to remove. Ending service... [cwa-set-perms] Successfully set permissions for '/config'! [cwa-set-perms] Successfully set permissions for '/calibre-library'! [cwa-set-perms] Successfully set permissions for '/app/calibre-web-automated'! [cwa-set-perms] Ending service... [auto-library]: Multiple metadata.db files found in library directory: