View Single Post
Old 11-29-2020, 02:59 PM   #4
compurandom
Wizard
compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.
 
Posts: 1,016
Karma: 500000
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
Quote:
Originally Posted by ownedbycats View Post
Also, don't download files directly into the autoadd folder; download elsewhere and copy them in. For me, that's the usual cause of otherwise valid books getting stuck.
Those don't get stuck for me. The browser creates an empty file of the correct name as a place holder, which calibre instantly imports and deletes, and a tempfile containing the real data which calibre ignores. When the download completes, the browser copies the data from the tempfile to the deleted file and deletes the tempfile.

Result: I can't find the real book, and calibre has imported something empty. Maybe the sequence of events is a bit different in windows and you end up with a stuck corrupt book?

Fix: I wrote something (for linux) that uses inotify and ignores the tempfile by regex and waits (using inotify) for the browser to close the real file, and then renames it into the calibre auto import directory. Right now, my code only looks at Downloads/books, but I've considered having it grab Downloads/*.epub too since I never download an epub I wouldn't want imported directly into calibre anyway.
compurandom is offline   Reply With Quote