1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-10-31 23:26:20 +00:00

Fix script to work with subfolders

James Armstrong 2024-07-25 22:49:05 -07:00
parent 71bd8127ce
commit 557958285e

@ -58,10 +58,10 @@ add_to_calibre() {
}
# Monitor the folder for new files
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"
inotifywait -m -r --format="%e %w%f" -e close_write -e moved_to "$WATCH_FOLDER" |
while read -r events filepath; do
echo "New file detected: $filepath"
add_to_calibre "$filepath"
done
```