Originally, the ripper script did not store the track number in the meta data of the Vorbis encoded file, and the track number was not part of the filename. This conversion reads the track listing from the database, retags the .ogg files with the track numbers and renames them to contain the track number (for the sake of completeness). This conversion is entirely optional. It is risky only if you've hand edited your Thundaural SQLite database to add tracks that were not ripped by the Thundaural CD ripper script (if you've only added albums to the system using either client/interface.pl, server/server.pl or server/ripper.pl, it should be okay to run this conversion.
Recognized options are:
- albums=<x>[,<x>...]
- Only convert tracks on the specified albums (by albumid)
- loose
- By default, this conversion will only manipulate ogg files that were generated by the Thundaural ripper script. Unfortuantely, older versions of the script didn't tag the file with that information, making it difficult to determine if the ripper script was responsible for that file. Setting loose=1 overrides that detection, and will force an update to the file even if it doesn't look like the Thundaural ripper script generated the file.
- limit=<number<
- Retag and rename at most <number> files. You can use this to work on the database incrementally to ensure that everything is working alright.
- pause=<seconds<
- Pause for <seconds> seconds between retagging and renaming each file.
- skipiflooksdone
- If the filename looks like it has the track number already in it, skip processing that file outright. Used in conjunction with limit to skip files processed during previous runs.
- dryrun
- don't actually change anything, just print out what would be done.
invoke this conversion like this:
server.pl --convert 'tracknumtags:loose;limit=5;pause=1;skipiflooksdone;albums=3,5'
You may want to make a backup copy of your storagedir (/home/storage) before performing this. Use the dryrun option to make sure things will happen like they should. This conversion will also add CDINDEXID, CDDBID, and METASOURCE tags to the file if these values exist in the database for the album this track came from, and rename the files to have fields in the name delimited by double colons, rather than hyphens (I think double colons are rarer in artist, album and track names than a hyphen, it's also not a shell or regular expression metacharacter), in order to improve future matching on the fields in the name (if necessary, which should be rare, but you never know).
First, run:
./server.pl --convert 'tracknumtags:loose;skipiflooksdone' --prog vorbiscomment:`which vorbiscomment`
And watch the output -- you might want to pipe it to a file to review. I know it produces a lot of output, sorry about that. If you see in the output that some of the tracks were not procsesed because they contained what looked like a track number already, find out which albumid it was and execute:
./server.pl --convert 'tracknumtags:loose;albums=XXX' --prog vorbiscomment:`which vorbiscomment`
where XXX is the albumid you want to convert.