here's a piece of code which matches the fid files to the database.
Only the root-playlist doesn't match, all others do... :
#include <fcntl.h>
#include <stdio.h>
#define DBFILE "/empeg/var/database"
#define TAGFILE "/empeg/var/tags"
int main(int argc, char *argv[])
{
unsigned char c;
char s[2048];
char *tags[20];
int i,end_entry,db_index;
FILE *fp,*fp2;
fp=fopen(TAGFILE, "rb");
i=0;
while (fgets(s,sizeof(s), fp) != NULL) {
s[strlen(s)-1]='\0';
tags[i++]=(char *)strdup(s);
}
fclose(fp);
i=0;
db_index=16;
fp=fopen(DBFILE, "rb");
while ( fread(&c,1,1,fp) > 0 ) {
if ( c == 0xFF ) {
end_entry=1;
} else {
if (end_entry) {
printf("--------------------------------\n\n");
i=db_index << 4 | 1;
printf("****************************\n");
printf("opening /drive0/fids/%x\n",i);
sprintf(s,"/drive0/fids/%x",i);
fp2=fopen(s, "rb");
if ( fp2 != NULL ) {
while (fgets(s,sizeof(s), fp2) != NULL) {
printf("%s",s);
}
fclose(fp2);
}
printf("****************************\n");
end_entry=0;
db_index++;
}
i=c;
fread(&c,1,1,fp);
fread(s,1,c,fp);
s[c]='\0';
printf("%s : %s\n",tags[ i ],s);
}
}
fclose(fp);
}