mirror of
https://github.com/KrumpetPirate/AAXtoMP3.git
synced 2024-11-18 03:08:57 +01:00
remove leading space after cut
This commit is contained in:
parent
fcef788bc4
commit
239ae1aa3f
10
AAXtoMP3
10
AAXtoMP3
@ -417,15 +417,17 @@ do
|
|||||||
save_metadata "${aax_file}"
|
save_metadata "${aax_file}"
|
||||||
genre=$(get_metadata_value genre)
|
genre=$(get_metadata_value genre)
|
||||||
if [ "x${authorOverride}" != "x" ]; then
|
if [ "x${authorOverride}" != "x" ]; then
|
||||||
#Override
|
#Manual Override
|
||||||
artist="${authorOverride}"
|
artist="${authorOverride}"
|
||||||
album_artist="${authorOverride}"
|
album_artist="${authorOverride}"
|
||||||
else
|
else
|
||||||
if [ "${keepArtist}" != "-1" ]; then
|
if [ "${keepArtist}" != "-1" ]; then
|
||||||
# sed command: 'C. S. Lewis' -> 'C.S. Lewis'
|
# Choose artist from the one that are present in the metadata. Comma separated list of names
|
||||||
artist=$(get_metadata_value artist | cut -d',' -f"$keepArtist" | $SED -E 's|\. +|\.|g; s|((\w+\.)+)|\1 |g')
|
# remove leading space; 'C. S. Lewis' -> 'C.S. Lewis'
|
||||||
album_artist="$(get_metadata_value album_artist | cut -d',' -f"$keepArtist" | $SED -E 's|\. +|\.|g; s|((\w+\.)+)|\1 |g')"
|
artist="$(get_metadata_value artist | cut -d',' -f"$keepArtist" | $SED -E 's|^ ||g; s|\. +|\.|g; s|((\w+\.)+)|\1 |g')"
|
||||||
|
album_artist="$(get_metadata_value album_artist | cut -d',' -f"$keepArtist" | $SED -E 's|^ ||g; s|\. +|\.|g; s|((\w+\.)+)|\1 |g')"
|
||||||
else
|
else
|
||||||
|
# The default
|
||||||
artist=$(get_metadata_value artist)
|
artist=$(get_metadata_value artist)
|
||||||
album_artist="$(get_metadata_value album_artist)"
|
album_artist="$(get_metadata_value album_artist)"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user