Only check additonal band slots if the more important ones are empty. Fix bug in if statement, was checking wrong variable.
This commit is contained in:
parent
fa175639d8
commit
bdc18dd727
@ -187,6 +187,7 @@ function migrate_music {
|
|||||||
echo "*** Artist=$artist"
|
echo "*** Artist=$artist"
|
||||||
|
|
||||||
band=""
|
band=""
|
||||||
|
if [[ -z "$artist" ]]; then
|
||||||
band="`exiftool -Band "$file"`"
|
band="`exiftool -Band "$file"`"
|
||||||
band="${band//Band /}"
|
band="${band//Band /}"
|
||||||
band="${band// : /}"
|
band="${band// : /}"
|
||||||
@ -196,8 +197,10 @@ function migrate_music {
|
|||||||
band="${band// / }"
|
band="${band// / }"
|
||||||
done
|
done
|
||||||
echo "*** Band=$band"
|
echo "*** Band=$band"
|
||||||
|
fi
|
||||||
|
|
||||||
album_artist=""
|
album_artist=""
|
||||||
|
if [[ -z "$artist" && -z "$band" ]]; then
|
||||||
album_artist="`exiftool -Albumartist "$file"`"
|
album_artist="`exiftool -Albumartist "$file"`"
|
||||||
album_artist="${album_artist//Albumartist /}"
|
album_artist="${album_artist//Albumartist /}"
|
||||||
album_artist="${album_artist// : /}"
|
album_artist="${album_artist// : /}"
|
||||||
@ -207,10 +210,11 @@ function migrate_music {
|
|||||||
album_artist="${album_artist// / }"
|
album_artist="${album_artist// / }"
|
||||||
done
|
done
|
||||||
echo "*** Albumartist=$album_artist"
|
echo "*** Albumartist=$album_artist"
|
||||||
|
fi
|
||||||
|
|
||||||
# Prefer Artist, then Band, then Albumartist
|
# Prefer Artist, then Band, then Albumartist
|
||||||
grandparent=""
|
grandparent=""
|
||||||
if [[ -n $album ]]; then
|
if [[ -n $artist ]]; then
|
||||||
grandparent="$artist"
|
grandparent="$artist"
|
||||||
elif [[ -n $band ]]; then
|
elif [[ -n $band ]]; then
|
||||||
grandparent="$band"
|
grandparent="$band"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user