1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-01 07:36:20 +00:00

Instead of inotifywait using "create" (which will error out when it tries to import a file in the middle of a transfer/download), use close_write to detect when files are done writing and moved_to for detecting files moved rather than copied into the dir

James Armstrong 2024-07-25 02:16:09 -07:00
parent 73d1cd5f0b
commit 0cf06778bb

@ -54,7 +54,7 @@ add_to_calibre() {
}
# Monitor the folder for new files
inotifywait -m -e create -e moved_to "$WATCH_FOLDER" |
inotifywait -m -e close_write,moved_to -e moved_to "$WATCH_FOLDER" |
while read -r directory events filename; do
echo "New file detected: $filename"
add_to_calibre "$filename"