Commit ef4f6d64 authored by Cédric Marie's avatar Cédric Marie
Browse files

tag-sieve: Fix UTF-8 encoding in MP3 tags



When setting titles and track numbers, with upt and uptn commands, it
is necessary to exclude id3v1 tags, even if they are cleaned later with
clean command, because they can break UTF-8 encoding in id3v2 tags.
Signed-off-by: default avatarCédric Marie <cedric.marie@openmailbox.org>
parent a8d2a926
......@@ -610,7 +610,7 @@ if [ "$command" = "upt" ]; then
# Remove .mp3 and leading disc and track numbers
tag_title=`echo ${file%.mp3} | sed 's/^[1-9] - //' | sed 's/^[0-9]\+ - //'`
printf "$file: \033[7m$tag_title\033[0m\n"
id3v2 --song "$tag_title" "$file"
id3v2 --id3v2-only --song "$tag_title" "$file"
done
}
# Set read-only permission
......@@ -711,12 +711,12 @@ if [ "$command" = "uptn" ]; then
current_disc=$tag_discnumber
tag_tracktotal=`ls -1 ${tag_discnumber}\ -\ *.mp3 | grep -c mp3`
fi
id3v2 --TPOS "$tag_discnumber/$tag_disctotal" "$file"
id3v2 --id3v2-only --TPOS "$tag_discnumber/$tag_disctotal" "$file"
printf "track \033[7m$tag_tracknumber\033[0m / \033[7m$tag_tracktotal\033[0m, disc \033[7m$tag_discnumber\033[0m / \033[7m$tag_disctotal\033[0m: $file\n"
else
printf "track \033[7m$tag_tracknumber\033[0m / \033[7m$tag_tracktotal\033[0m: $file\n"
fi
id3v2 --track "$tag_tracknumber/$tag_tracktotal" "$file"
id3v2 --id3v2-only --track "$tag_tracknumber/$tag_tracktotal" "$file"
done
}
# Set read-only permission
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment