# Rivendell Filter

## Overview

Rivendell_filter is a script designed to be used to import existing audio and meta-data from another Rivendell system.

## Usage

`rivendell_filter -h hostname -u username -p password -A audio-dir -g default-group -s start-cartnum -e end-cartnum`

-h hostname

  The MySQL hostname of the source Rivendell database.

-u username

  The MySQL username of the source Rivendell database.

-p password

  The MySQL password of the source Rivendell database.

-A audio-dir

  The path to the directory containing the source Rivendell audio files.

-g default-group

  The name of the group in which to place carts belonging to a source Group for which there is no corresponding destination Group.

-s start-cartnum

  The first cart in the range of those to be transferred.

-e hostname

  The last cart in the range of those to be transferred.

## Procedure

In order transfer carts from an external Rivendell system, proceed as follows:

### Create Rivendell Groups

In RDAdmin->ManageGroups, create a Group to correspond to each Rivendell Group that exists in the library to be imported, and an additional group to catch any carts that may not have a corresponding Group.

### Locate the External Rivendell Database and Audio Files

The directory containing the audio files can be mounted from a remote system if needs be. Read-only access is adequate (and in fact recommended), as the script does not modify these items in any way.

### Verify Available Disk Space

Verify that enough disk space is available in the '/var/snd/' directory of the destination system to accomodate the audio to be imported. You should have at least the amount of space currently occupied by the source files, plus 5 percent additional.

### Invoke Script

Start up the script, as described in the USAGE section above. The script will print progress reports as it proceeds, or notify you of error conditions as required.

### Duplicate Cart Numbers

If a cart from the source system has the same number as one one the destination, the destination cart (data and *all* audio) will be overwritten!

### Note on Audio Processing

Rivendell_filter does not alter or reencode the audio sample data in any way, and thus does *not* incurr any generation or transcoding loss of quality. At the same time, this means that the incoming audio will be brought into the new Rivendell system *exactly* as it exists in the source system, with all parameters (e.g. sample rate, bit rate, level, etc) unaltered. If you need to alter one or more of these parameters as part of the import process, we suggest you use the RDImport script instead.

### Note on Group Assignments

Rivendell_filter makes no attempt to enforce group numbering rules! If a group to which a given source cart belongs exists on the destination system, the cart will be placed in that group, regardless of numbering rules.