Installed to: /usr/local/obs/tools
The AddFiles.pl script can be
used to search for existing mp3 files and import then into Obs. This
script does not require the obs server to be running, but it requires
MySQL to be running.
The AddFiles script will recursively search the paths given on the command
line and add any mp3 files it finds to the local Obs server.
The script will read ID3v1, ID3v2 tags from the files,
and even based on the name of the file it will attempt
to extract information about the Artist, Title and Album.
For instance, if you have your mp3 collection stashed in /mnt/mp3,
make sure to create a Volume file in /mnt/mp3 -- AddFiles.pl requires
a Volume file to be present in the specified path. If it cannot find
the Volume file in the specified path it will scan upwards in the path
to find a Volume files. So, if you want to cheat and have all your
mp3s in your file system use one Volume file, simply create the file
Volume file in /. :-)
AddFiles.pl can be run in test mode (-t) and it will search for mp3s, but
it will not actually add them to the server. It can also be run in update mode
where it will add new files and update the metadata on existing files --
without the -u file existing files are skipped.
If you have all of your mp3 files oranigzed in a particular file naming
scheme, you can import the meta data (artist, album, track, and title)
straight from the file name. You will need to define the filename pattern that
AddFiles.pl should use in /usr/local/obs/etc/obs.conf.
For instance, if your files are laid out like:
(Portishead)-Dummy-[03]-Strangers.mp3
Then set the ImportFileMask in obs.conf to:
ImportFileMask (%artist)-%album-[%track]-%title.mp3
AddFiles.pl will first parse the filenames of found mp3s to see if they match
the ImportFileMask string. If so it will parse the meta data out of the
file name. Then it will try to find data in an ID3v1 tag and then it will
try to find data in an ID3v2 tag. Note that data found in an ID3v2 tag
overrides the data in an ID3v1 tag, which in turn overrides the data
found in the filename.
|