Not only that, but I wrote a script that will update your ogg comments based on the filename of the ogg (assumes that filename is in "Artist - Trackname.ogg" format):
Code:
#!/bin/bash
# Written by Rob 'Feztaa' Park.
# Email: feztaa at shaw dot ca
# Version 0.1
# Released under the GPL. For details, read this:
# http://www.opensource.org/licenses/gpl-license.html
vorbiscommentpath="/usr/bin/vorbiscomment" # Where is vorbiscomment?
# What to do should something go wrong.
function you_fail() {
echo "This script will fix the comment tags on your ogg files by taking what is in the filename,"
echo "and using it as the artist/title information for the file. It assumes that your filename"
echo "is in the format \"Artist - Title.ogg\". Just make sure that the filename is correct, and"
echo "this script will do the rest!"
echo
echo "Usage: $0 \*.ogg"
echo
echo "You need to specify one argument, and it must be a filename. You can specify wildcards"
echo "in the filename, such as the above example, which matches all ogg files in the current"
echo "directory. You must escape (add a \ in front of) the * in order for this to work."
echo
echo "For example, if you wanted to run this script on all Rammstein files in the current directory,"
echo "you would do this:"
echo
echo "$0 Rammstein\*.ogg"
echo
echo "Or, if you wanted to run this on all the different remixes of Rammstein's Sonne in the current"
echo "directory, you would do this:"
echo
echo "$0 \*Sonne\*.ogg"
echo
echo "Questions, Comments, or bug reports to Rob 'Feztaa' Park (feztaa at shaw dot ca)."
exit 1
}
# Do the actual update process.
function update_vorbis() {
artist=$(echo $i|cut -d '-' -f1) # The artist is the part before the -
artist=$(echo $artist) # Cut off the trailing space from the artist name.
title=$(echo $i|cut -d '-' -f2) # The title is the part after the -
title=$(echo $title|cut -d '.' -f1) # Cut off the file extension (.ogg) from the title. Also gets rid of the leading space.
echo -n "Working on: $i ... "
$vorbiscommentpath -w "$i" -t "artist=$artist" -t "title=$title" && echo done! || echo failed!
}
# The user has given us no argument! He or she does not understand how this program works.
if [ ! "$1" ]; then
you_fail
fi
if [ ! -f "$1" ]; then
# User has failed first file check. Either he used wildcards, or gave a bad file.
for i in $1; do
if [ ! -f "$i" ]; then
# User has failed both file checks. This means he specified a nonexistant file.
echo "File not found. Type \"$0 --help\" for more help."
exit 1
else
# User has failed first check, but passed second. This means he used wildcards, and specified an existant file.
# Continue working.
update_vorbis
fi
done
else
# User has passed first check, but failed second. This means he did not use wildcards, but did specify an existant file.
i=$1
update_vorbis
fi
Hope you guys like it, it sure was useful for me. Now all I need is the exact same thing, but for MP3s 
(edit: just fixing typos)
Bookmarks