dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: ID3 database browsing

Re: ID3 database browsing

From: Björn Stenberg <>
Date: Wed, 13 Oct 2004 10:49:48 +0200

Linus Nielsen Feltzing wrote:
> 1) What do we want in the ID3 browser? I mean, which fields do we
> support? How do we want to search?

The three fields artist, album and song goes a long way. I think we should start with those (while of course not designing ourselves into a corner where we can't add others).

> 2) How to design the database to allow for fast searching/browsing with
> as little memory usage as possible? We can waste quite a lot of disk
> space, but not that much RAM.

Here's a discussion starter. For the above three fields, we could use four files:

allfiles.id3db is a simple file list, one file per line. The list is un sorted.

<field>-index.id3db are index files, sorted alphabetically by field:

<allfiles offset1>;<song name1>
<allfiles offset2>;<song name2>

<song-index offset1>;<song-index offset2>;<album name1>
<song-index offset1>;<song-index offset2>;<album name2>

<album-index offset1>;<album-index offset2>;<artist name1>
<album-index offset1>;<album-index offset2>;<artist name2>

That takes care of finding and browsing artists, albums and songs by name. We can also connect artists to their albums and albums to their songs. We don't have connections backwards though (browsing artist and album from song), but since that data is present in the id3 tag we can just search for it.

This format is also expandable with year, genre etc using the same formula.

> 3) How to synchronize/generate the database?

Offline. No incremental magic, total remake each time (checking to see if a file's info has changed is more expensive than just adding it).

First create the list of files, then song-index album-index and artist-index in that order (since they depend on each other).

Received on 2004-10-13

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy