release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > Main > TagDatabase (r45)

*NOTE: The tag database described here is deprecated and may no longer work. Please use TagCache? for similar functionality.*

Creating the database

Windows users

Perl version

1. Save the following files to the /.rockbox directory on your player harddisk:

2. Install a full version of Perl on your PC, like ActiveState?'s free package here: http://www.activestate.com/Products/ActivePerl/?mp=1.

3. Doubleclick the makedb.bat that you put in your /.rockbox directory in step 1 and wait for the indexer to complete.

Java version

1. Save the following files to the /.rockbox directory on your player harddisk:

2. Install Java Runtime Environment 5.0 (aka 1.5.0) on your PC, http://java.sun.com/j2se/1.5.0/download.jsp.

(Only necessary if you haven't already installed a Java Runtime Environment >= V1.4)

3. Make sure java gets installed in your system path (unsure if the installer does this..)

4. Doubleclick the makedbj.bat that you put in your /.rockbox directory in step 1 and wait for the indexer to complete.

Linux users

Perl version

1. Save the following files to the /.rockbox directory on your player harddisk:

2. Run "perl songdb.pl --path /mnt/archos --strip /mnt/archos" from inside the .rockbox directory.

You can of course run it from anywhere. Use the --help parameter to see all options.

Java version

1. Save the following file to the /.rockbox directory on your player harddisk:

2. Install Java Runtime Environment 5.0 (aka 1.5.0) on your computer, http://java.sun.com/j2se/1.5.0/download.jsp.

(Only necessary if you haven't already installed a Java Runtime Environment >= V1.4)

3. Make sure java gets installed in your system path (unsure if the installer does this..)

4. Run "java -jar SongDB.jar --strip /mnt/archos /mnt/archos" from inside the .rockbox directory

Run without arguments to see all the options

Using the database

After running songdb.pl and disconnecting from USB you have to reboot your unit first (this will be improved in a future version).

The ID3 browser is treated as a directory filter, so you enable it by changing your "Show Files" setting to "ID3 database", either using the F2 quickscreen (recorders only) or in Menu->General Settings->File View->Show Files.

Development

Note: everything from this point on is rather out of date, please see DatabaseV2? for an up to date description, till we move everything to its proper wiki page.

Design principles

  • Limited RAM
  • Limited CPU
  • 'Unlimited' disk space

  • Binary format (quick and easy to load and parse)
  • Tables use fixed-length fields, where field length is specified in file header
  • Tables are sorted by the index program, so Rockbox can use binary searching

Hence proposal is to build the binary tag database file 'offline', by running a software application on a connected PC. Whether the PC application generates the entire database each time, or uses a smart incremental approach, is not discussed here. The database format is optimised for READING not WRITING.

Use Cases

Must have

  • Get a list of artists (done)
  • Get a list of albums for a given artist (done)
  • Get a list of songs for a given album (done)
  • Search for artists, albums and songs by name (done)

Would like to have

  • Get a list of albums for a given genre
  • Get a list of albums released in a given year
  • Get a list of artists whose songs are in a given genre
  • Get a list of artists whose songs were released in a given year range
  • Get a list of songs in a given year range AND genre
  • Get a list of top-100 played songs (and other player-generated statistics)

User Interface

The UI will be very much like the current directory browser, only the directories are virtual. I.e. something like this:

Artists -+- artist1 -+- a1album1 -+- a1a1song1
         |           |            |- a1a1song2
         |           |            `- a1a1song3
         |           `- a1album2 -+- a1a2song1
         |                        `- a1a2song2
         |- artist2 --- a2album1 -+- a2a1song1
         |                        `- a2a1song2
         `- [All artists]

Albums  -+- a1album1 -+- a1a1song1
         |            |- a1a1song2
         |            `- a1a1song3
         |- a1album2 -+- a1a2song1
         |            `- a1a2song2
         |- a2album1 -+- a2a1song1
         |            `- a2a1song2
         `- [All albums]

Songs   -+- a1a1song1
         |- a1a1song2
         |- a1a1song3
         |- a1a2song1
         |- a1a2song2
         |- a2a1song1
         `- a2a1song2

Search  -+- Artist
         |- Album
         `- Song

etc...

Unsolved issues

MattSwieboda: While in the ID3 Database view, virtual mp3 files and folders do not have the same context menu as the other views. You cannot add the song to a playlist or use the Open With... etc.
I Attachment Action Size Date Who Comment
SongDB.jarjar SongDB.jar manage 636.1 K 11 Jul 2006 - 21:09 JensArnold SongDB? java version. (reqs >= jre1.4)
makedb.batbat makedb.bat manage 0.1 K 11 Jul 2006 - 21:09 BjornStenberg Batch file for creating id3db
makedbj.batbat makedbj.bat manage 0.1 K 11 Jul 2006 - 21:09 JensArnold Batch file for creating the tag db with SongDB?.jar
perl.exeexe perl.exe manage 20.1 K 11 Jul 2006 - 21:09 BjornStenberg Perl executable
perl58.dlldll perl58.dll manage 740.1 K 11 Jul 2006 - 21:09 BjornStenberg Perl win32 dll
Edit | Attach | Print version | History: r47 | r46 < r45 < r44 < r43 | Backlinks | View wiki text | More topic actions...
r45 - 09 Aug 2006 - 04:19:53 - AustinAppel

Parents: WebHome
Copyright by the contributing authors.