$Id $
mediadbs v. 0.04 general documentation
Copyright (C) 2002 Dominic Hargreaves <dom@earth.li>
- Installing mediadbs
Instructions for installing mediadbs can be found in the separate document "INSTALL".
- Notes on usage
Mediadbs comprises a bunch of PHP scripts which (hopefully) should be self-explanatory for doing queries and a set of command-line Perl scripts. The DB update command-line scripts are not entirely straightforward, so a few notes on command usage are in order.
All the Perl scripts will output brief syntax instructions if you run them with no options.
- updatedb.pl
This is the main update script. Run it to add individual mp3s to the database. Basically it accepts filenames from STDIN for mp3s to add, so would typically be used with find: eg
find /path/to/mp3s -iname *.mp3 | ./updatedb -s blah -r /path/to/mp3s
Be careful though, there is currently a bug which means that you mustn't use a / on the end of the "-r" path.
- purge.pl
This will trawl through the existing database looking for files that no longer exist on the server.
- delete.pl
This deletes mp3s that whose paths are received on STDIN from the database.
- findid.pl
Accepts a list of paths to mp3s on STDIN, and outputs a list of ids. See addalbum.pl for a typical use.
- addalbum.pl
This creates an album entry and associates mp3 entries with it. It will use the id3 tag of the first file for its values so make sure all your mp3s have id3 tags.
The option -v is needed when you are adding a compilation album. The Artist will then be set to "Various" rather than that of the first album.
Example usage:
./addalbum.pl `find "/foo/bar/Artist/Album"*| ./findid.pl -s tirian -r /mnt`
