improved --decorate feedback
This commit is contained in:
@@ -10,6 +10,10 @@ gettags() {
|
|||||||
# all relevant MusicBrainz IDs.
|
# all relevant MusicBrainz IDs.
|
||||||
# @input $1: Path to directory with album
|
# @input $1: Path to directory with album
|
||||||
decorate() {
|
decorate() {
|
||||||
|
if [ -f "$1/$DECORATION_FILENAME" ]; then
|
||||||
|
info "Directory $1 has already been decorated (skipping)"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
decoration=$($JQ -n '.tracks = {}')
|
decoration=$($JQ -n '.tracks = {}')
|
||||||
tmpf=$(mktemp)
|
tmpf=$(mktemp)
|
||||||
(cd "$1" && find . -type f -iname '*.mp3' -o -iname '*.mp4' -o -iname '*.flac' -o -iname '*.m4a') >"$tmpf"
|
(cd "$1" && find . -type f -iname '*.mp3' -o -iname '*.mp4' -o -iname '*.flac' -o -iname '*.m4a') >"$tmpf"
|
||||||
@@ -29,6 +33,7 @@ decorate() {
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
info "Decorating $1 as release $rid"
|
||||||
releaseid="$rid"
|
releaseid="$rid"
|
||||||
fi
|
fi
|
||||||
decoration=$(echo "$decoration" | $JQ ".tracks += {\"$tid\": \"$f\"}")
|
decoration=$(echo "$decoration" | $JQ ".tracks += {\"$tid\": \"$f\"}")
|
||||||
|
Reference in New Issue
Block a user