From d6e05c90ab910d9331eaa7805ea9b302f08f2b94 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Sat, 28 Jan 2023 10:01:53 -0500 Subject: [PATCH] 1.09 - Bugfix for incoming m4b Script was delete m4b files, when it shouldn't... --- root/scripts/readarr-pp.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/scripts/readarr-pp.bash b/root/scripts/readarr-pp.bash index 98d6dce..78d8faf 100644 --- a/root/scripts/readarr-pp.bash +++ b/root/scripts/readarr-pp.bash @@ -2,7 +2,7 @@ export LC_ALL=C.UTF-8 export LANG=C.UTF-8 TITLESHORT="APP" -ScriptVersion="1.08" +ScriptVersion="1.09" SECONDS=0 set -e @@ -16,7 +16,7 @@ echo "Processing: $1" Clean () { if [ $(find "$1" -type f -regex ".*/.*\.\(\m4b|flac\|mp3\|m4a\|alac\|ogg\|opus\)" | wc -l) -gt 0 ]; then - find "$1" -type f -not -regex ".*/.*\.\(flac\|mp3\|m4a\|alac\|ogg\|opus\)" -delete + find "$1" -type f -not -regex ".*/.*\.\(\m4b\flac\|mp3\|m4a\|alac\|ogg\|opus\)" -delete find "$1" -mindepth 2 -type f -exec mv "{}" "$1"/ \; find "$1" -mindepth 1 -type d -delete else