How the importer works

The importer goes through recursively all directries given on either command line as parameters or read from the valid config file. It reads all files ending on .ogg, .mp3, or .mp2. It handles one file at the time.

Note

The importer is case sensitive.

It starts with the artist. If an artist with the same name not exist an new artist is created in the database.

The second stage is to check if an album with the current name and the current artist exist, if not it is created.

An album can contains several volumes, which we call records. for instance a collection box have several records but is one album. Of course, this requires that the ALBUM-tag is the same for all records. It also requires that there is a VOLUME-tag, in other case all records will be handled as one record.

The third stage is to check if we have a record with the that is a part of the current album. If DISCID or VOLUME is set, these must be the same too. In other case a new record is created.

Now we will insert the track, if there are no track with the same record, title and track number a new track is created. In other case nothing happends.

At last, all genres will be inserted (if they not exists) into the database and linked to the track.

If the importer is executed several times and no metadata has changed, nothing will happend in the database.