I've just announce mp3tofid 2.00 in the programming forum.


But perhaps it's easier to explain the database files
in English than in C code.

The database files are probably also much easier to
write than to parse.

The playlists file is simply a concatenation
of all playlist files in FID order. This is easily
seen as the first part of playlists is exactly the
same as the root playlist (/drive*/fids/100).

The tags file and the database file are
tightly related. tags is a text file containing all tag
names in all tag files (/drive*/fids/*1). Order does
not seem to matter, though I guess "type" needs to
be on the first line. The tags file needs to be padded
with newlines until it is 256 lines long.

database is a binary file, containing all tag values
for all FID's in FID order. All nonexisting FID's
until the FID with the highest FID number need to be
included, as an empty record, closed by 0xFF.

Nonempty records consist of one byte being an index into
the tags file, one byte stating the length of the tag
value and then the tag value itself. The record is
terminated with a 0xFF character, just like the
nonexisting FID's.

FID 0 is special and needs to be in the database,
even though it does not exist in the fids dirs.
FID 0 has just one tag: "type=illegal"

This all means tag values may not be longer than 255
characters, and may not contain newlines. This
currently is not enforced by mp3tofid.

Pim