diff --git a/src/sh/local.sh b/src/sh/local.sh index 2943d87..3c44c84 100644 --- a/src/sh/local.sh +++ b/src/sh/local.sh @@ -10,6 +10,10 @@ gettags() { # all relevant MusicBrainz IDs. # @input $1: Path to directory with album decorate() { + if [ -f "$1/$DECORATION_FILENAME" ]; then + info "Directory $1 has already been decorated (skipping)" + return 0 + fi decoration=$($JQ -n '.tracks = {}') tmpf=$(mktemp) (cd "$1" && find . -type f -iname '*.mp3' -o -iname '*.mp4' -o -iname '*.flac' -o -iname '*.m4a') >"$tmpf" @@ -29,6 +33,7 @@ decorate() { break fi else + info "Decorating $1 as release $rid" releaseid="$rid" fi decoration=$(echo "$decoration" | $JQ ".tracks += {\"$tid\": \"$f\"}")