How well does this work with Readarr? #248
Replies: 10 comments 10 replies
|
I was just wondering the same thing while looking in to setting up some sort of book automation. Would be interesting to hear what peoples workflows are like. |
|
Going to add my voice here as someone trying to integrate this with Readarr. |
|
I can think of a couple of ways to do this:
#!/usr/bin/env bash
# Folder to monitor
WATCH_FOLDER="/media/Readarr_library"
echo "Watching folder: $WATCH_FOLDER"
# CWA Ingest Folder Path
CWA_INGEST="/opt/cwa-book-ingest"
echo "CWA Ingest Folder: $CWA_INGEST"
# Monitor the folder for new files
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"
cp -r "$filepath" "$CWA_INGEST"
done |
|
Do new books need to go to the ingest folder? What if they just went to the "root folder" in Readarr which is where your library is located? |
|
Alternatively, you could configure your downloader (at least for usenet via nzb/sabnzbd) to dump downloads into the ingest folder and then CWA would ingest and move to your root folder (aka library folder). |
|
@vhsdream I really liked your first suggestion to use a custom script triggered by readarr. The suggestion inspired me to write the below script. I have it set up in readarr to trigger on release import and on upgrade. When that happens it will copy the ebook file to the specified cwa ingest folder. This was only really made possible as I discovered readarr provides a environment variable with the full paths for imported or upgraded books as Anyway I hope some people find this script useful. It has massively helped me. Note: I believe #!/usr/bin/env bash
# Log file for debugging
LOGFILE="/config/logs/readarr-book-copy.log" # path to your readarr log folder
# Log all environment variables (useful for debugging Readarr's behavior)
# echo "$(date): Script environment variables:" >> "$LOGFILE"
# set >> "$LOGFILE"
# Exit early if READARR_EVENTTYPE is "Test"
if [ "$readarr_eventtype" == "Test" ]; then
echo "$(date): INFO - Received 'Test' event from Readarr, exiting script early." >> "$LOGFILE"
exit 0
fi
# Readarr environment variables
BOOK_PATHS="$readarr_addedbookpaths"
DEST_DIR="/media/book-ingest" # Replace with the path to your book ingest folder
# Check if BOOK_PATHS is empty
if [ -z "$BOOK_PATHS" ]; then
echo "$(date): ERROR - No book paths found in READARR_ADDEDBOOKPATHS." >> "$LOGFILE"
exit 1
fi
# Process each book path (assuming | is the separator)
IFS='|' read -ra BOOK_ARRAY <<< "$BOOK_PATHS"
for BOOK_PATH in "${BOOK_ARRAY[@]}"; do
# Trim leading/trailing spaces (just in case)
BOOK_PATH=$(echo "$BOOK_PATH" | xargs)
# Ensure the book file exists
if [ ! -f "$BOOK_PATH" ]; then
echo "$(date): ERROR - Book not found: $BOOK_PATH" >> "$LOGFILE"
continue
fi
# Extract the filename
BOOK_FILENAME=$(basename "$BOOK_PATH")
# Define the destination file path
DEST_BOOK="$DEST_DIR/$BOOK_FILENAME"
# Copy the book
cp -v "$BOOK_PATH" "$DEST_BOOK" >> "$LOGFILE" 2>&1
# Check if the copy was successful
if [ $? -eq 0 ]; then
echo "$(date): SUCCESS - Copied '$BOOK_PATH' to '$DEST_BOOK'" >> "$LOGFILE"
else
echo "$(date): ERROR - Failed to copy '$BOOK_PATH'" >> "$LOGFILE"
fi
done
exit 0 |
|
Won't any solution where Readarr moves it to the ingest folder still not solve the issue of the management part of Readarr? Sure it will move it to the CWA ingest folder, but then CWA will ingest it and Readarr will not longer see it and keep track of what you have. |
|
I see Readarr is capable to send to a Calibre content server. Wouldn't it be possible for it to use the database on Calibre-Web-Automated ? |
|
Yeah, this was my way too...
Readarr hence isn't aware of my current collection and stops tracking it
after deletion.
It serves purely as an automated downloader.
Though Readarr is now pretty borked, and I've actually resorted to
searching/sending book torrents directly in Prowlarr and no longer using
Readarr.
…On Mon, 28 Jul 2025 at 08:41, Mathis Gauthey ***@***.***> wrote:
As for me I ended up outputting from readarr directly inside my CWA input
folder.
Readarr hence isn't aware of my current collection and stops tracking it
after deletion.
It serves purely as an automated downloader.
—
Reply to this email directly, view it on GitHub
<#248 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BO52ROT76LKP5I3Q3ZJOKGL3KXA2FAVCNFSM6AAAAABWZDELASVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGOJQGYZTOMA>
.
You are receiving this because you commented.Message ID:
<crocodilestick/Calibre-Web-Automated/repo-discussions/248/comments/13906370
@github.com>
|
|
Crocodilestick and the creator of Chaptarr, an upcoming heavily revamped Readarr fork, have recently discussed working together to allow for interoperability of the two projects. Chaptarr is still in a closed Alpha phase but they both seem open to making the projects work well together in a future release. |
Uh oh!
There was an error while loading. Please reload this page.
I just installed this last night and I love the work put into it!
However, unless I'm mistaken, this doesn't really work with Readarr's function as a book database, does it?
Since how you add books is the ingest folder and that removes whatever you put into it.
Or is there a way to use both in conjunction with each other?
Thank you!
All reactions