Skip to content

The Tomato Backend Server

The backend server is written in Python's Django web framework, heavily leveraging its automatic admin interface.

To get started, you'll have to install the server first.

Configuration

User interface options

STATION_NAME --- Type: String

The name of your station.

Default: 'Tomato Radio Automation'

CLOCK --- Type: Off, 12-hour, and 24-hour

This will enable a clock that displays the current time in the desktop app (12- or 24-hour display). On larger screens the date will also display.

Default: Off

UI_MODES --- Type: Simple, standard, and/or advanced mode

Restrict what user interface modes are available to the desktop app.

Default: Simple & standard mode

UI_MODE_RESET_TIMES --- Type: String

Reset UI mode to the simplest enabled mode according to this setting. Enter a list of times (in 24-hour HH:MM format) with each time on a single line. Set to 0 disable. The below example would reset the UI mode at midnight, 6am, noon, and 6pm:

00:00
06:00
12:00
18:00

Default: 0 (feature disabled)

ONE_CLIENT_LOGIN_PER_ACCOUNT --- Type: Boolean (true or false)

Only allow one desktop client to be connected per account.

Default: False

Server audio processing

AUDIO_BITRATE --- Type: 32kbps through 320kbps

The audio bitrate to convert an asset to, if and only if processing is required.
NOTE: processing is required when a file that is uploaded is not a valid MP3 file or TRIM_SILENCE is on.

Default: 192kbps

EXTRACT_METADATA_FROM_FILE --- Type: Boolean (true or false)

Attempt to extract metadata from audio file when True, if this is set to False the system just uses filename. For example with mp3s, metadata would extracted from an ID3 tag.

Default: True

PREVENT_DUPLICATE_ASSETS --- Type: Boolean (true or false)

Prevent duplicate audio assets from being uploaded when True. If False, you may have multiple audio assets with the same underlying audio file.

Default: True

TRIM_SILENCE --- Type: Boolean (true or false)

Trim silence from the beginning and end of audio files when True. Since this processing is done on the server, it's applied only at the time an audio file is uploaded. This means files will have silence trimmed (or not) according to this setting at the time of upload.

Default: True

REJECT_SILENCE_LENGTH --- Type: Numeric

Reject silence assets of this many seconds. Set to 0 disable.

Default: 0 (feature disabled)

RELOAD_PLAYLIST_AFTER_DATA_CHANGES --- Type: Boolean (true or false)

Reload all connected client playlists when a data change occurs.

Default: False

Playout options

BROADCAST_COMPRESSION --- Type: Boolean (true or false)

Enable broadcast compression when True, smoothing out dynamic range in audio output.
NOTE: compression is applied at the time you play an audio asset and performed on-the-fly in the desktop app.

Default: False

WARN_ON_EMPTY_ROTATORS --- Type: Boolean (true or false)

Warn when a rotator is disabled or has no eligible assets to choose from.

Default: True

WAIT_INTERVAL --- Type: Numeric

Time to wait between stop sets (in seconds). Set to 0 to disable the wait interval entirely.

Default: 1200

WAIT_INTERVAL_SUBTRACTS_FROM_STOPSET_PLAYTIME --- Type: Boolean (true or false)

Wait time subtracts the playtime of a stop set in minutes when True. When enabled Tomato will provide more even results, ie the number of stop sets played per hour will be more consistent at the possible expense of an individual DJs air time.

Default: False

WAIT_INTERVAL_SUBTRACTS_FROM_STOPSET_PLAYTIME_MIN_LENGTH --- Type: Numeric

When WAIT_INTERVAL_SUBTRACTS_FROM_STOPSET_PLAYTIME is set to True, wait intervals are of variable length. A very long stopset might naively result in a negative wait interval. This setting avoids that by setting minimum wait interval length (in seconds).

Default: 600

NO_REPEAT_ASSETS_TIME --- Type: Numeric

The time (in seconds) required to elapse for the Desktop app to attempt to not repeat any assets. Set to 0 to disable and allow potential repetition in the randomization algorithm. If there are not enough assets in a rotator to respect this setting, it will be ignored.

Default: 0 (feature disabled)

STOPSET_OVERDUE_TIME --- Type: Numeric

The time (in seconds) after the WAIT_INTERVAL after which an "overdue" message will flash. Set to 0 disable.

Default: 0 (feature disabled)

STOPSET_PRELOAD_COUNT --- Type: Numeric

Number of stopsets to preload in the UI. 2 or 3 are good values for this, since new data could make preloaded ones stale.

Default: 2

ALLOW_REPEATS_IN_STOPSET --- Type: Boolean (true or false)

The randomization algorithm will try its absolute best to avoid duplicates. However, when that's not possible (for example because of a nearly empty rotator), do you want the same asset to repeat (True), or for the rotator to be ignored in a given stop set (False)?

Default: False

END_DATE_PRIORITY_WEIGHT_MULTIPLIER --- Type: Numeric

Multiply an asset's weight by this number if it has an end date and the end date is in the next 24 hours (one day). Set to 0 to disable this feature.

Default: 0 (feature disabled)