Indexing Your Music
One of the goals of the version 2 rewrite was to investigate ways of speeding up the server, and working with databases.
To that end GNUMP3d v2.5 and higher will no longer directly read the song tags from your audio files upon each directory access, instead song tags are read from a "database file"
When the server starts it will index all the files which are found beneath your defined 'root' directory - writing out the filename and tag informatin from each file it finds.
At any time you may update the database by manually running the installed script 'gnump3d-index', this script may also give you statistics upon your archive if you run with the '--stats' argument:
Alternatively (since version 2.9.2) you may cause the server to re-index itself by sending it a SIGHUP signal on Unix or GNU platforms. Note that this only works when you're not running with the --debug flag.
skx@hell:~$ gnump3d-index --stats Beneath /home/mp3 there are: 505 audio files - totalling 2GB.
The song tag information is then used for searching your archive via the search plugin, and for building up the web interface.
The database is currently nothing more sophisticated than a flat file which you may view with your favourite text editor if you wish. It is entirely possible that the information will be optionally stored in a real database in the future.
To control where the database resides you may specify it's path within the gnump3d.conf file - using the setting below:
# # As a speedup and optimisation song tag is read via a companion script # which is called 'gnump3d-index'. This will be run automatically when # the server starts if possible. # # This next setting controls where that script will write its tag database # to. # tag_cache = /var/cache/gnump3d/song.tags
To keep this database up to date when you install the server it is recommended that you add a cron job to re-index your music once a day, or so. (The Debian GNU/Linux package will do this automatically when it is installed).