1.09 - Bugfix for incoming m4b

Script was delete m4b files, when it shouldn't...
master
RandomNinjaAtk 2 years ago committed by GitHub
parent 0e2b601452
commit d6e05c90ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,7 +2,7 @@
export LC_ALL=C.UTF-8 export LC_ALL=C.UTF-8
export LANG=C.UTF-8 export LANG=C.UTF-8
TITLESHORT="APP" TITLESHORT="APP"
ScriptVersion="1.08" ScriptVersion="1.09"
SECONDS=0 SECONDS=0
set -e set -e
@ -16,7 +16,7 @@ echo "Processing: $1"
Clean () { Clean () {
if [ $(find "$1" -type f -regex ".*/.*\.\(\m4b|flac\|mp3\|m4a\|alac\|ogg\|opus\)" | wc -l) -gt 0 ]; then 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 2 -type f -exec mv "{}" "$1"/ \;
find "$1" -mindepth 1 -type d -delete find "$1" -mindepth 1 -type d -delete
else else

Loading…
Cancel
Save