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
638 stars 12 forks source link

Downloading torrent files direct into cwa-ingest causes errors and duplicate imports #28

Closed jmarmstrong1207 closed 3 months ago

jmarmstrong1207 commented 3 months ago

I am speculating its due to how torrent downloading works, where it downloads in chunks, so sometimes it partially downloads a file then triggers close_write after that chunk is done, then proceeds to another file. inotifywait is likely seeing that close_write and triggers the import process.

For now, the fix will be to make a warning in the readme to NOT download torrents directly inside cwa-book-ingest

TheDMV2 commented 3 months ago

Are you putting partially completed files into the ingest folder? That seems like a Bad Idea[tm].

You should have a partially completed folder, and a finished folder; and that second folder could be watched by the ingester, but I wouldn't ever have anything touch an active download.

jmarmstrong1207 commented 3 months ago

Are you putting partially completed files into the ingest folder? That seems like a Bad Idea[tm].

You should have a partially completed folder, and a finished folder; and that second folder could be watched by the ingester, but I wouldn't ever have anything touch an active download.

True. Made a warning in readme to not download directly in it