Commit ee972ab6 authored by Cédric Marie's avatar Cédric Marie

myaudiotags: Use padding in 'update' command

In order to take advantage of padding, and to avoid rewriting the
entire file, remove the tags before setting them again in the 'update'
command. If the new title is not longer than the previous one, the file
will not be rewritten.

The 'clean' command still needs to be run afterwards, and will remove
the padding if present.
Signed-off-by: default avatarCédric Marie <>
parent 422b0c3d
......@@ -636,6 +636,8 @@ if [ "$command" = "update" ]; then
while read file
# Remove the tags before they are set again
metaflac --remove-tag=TITLE --remove-tag=TRACKNUMBER --remove-tag=TRACKTOTAL --remove-tag=DISCNUMBER --remove-tag=DISCTOTAL "$file"
# Remove .flac and leading disc and track numbers
tag_title=`echo ${file%.flac} | sed 's/^[1-9]\.//' | sed 's/^[0-9]\+\. //'`
metaflac --set-tag="TITLE=$tag_title" "$file"
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