Databases
On this configuration page, you manage the database connections of this mAirList installation. A database connection makes an audio library (and possibly scheduled playlists) available in mAirList, e.g. in the database browsers, the playlist search, and for the hourly playlist loading.
In most installations, this will be a single connection to an mAirListDB database. You can, however, set up any number of connections, including connections to 3rd party databases.
This page is also available in the live configuration (mAirList Control Panel).
Managing Connections
The list shows all configured database connections by their caption. The following functions are available from the toolbar:
- Add…: Add a new database connection. A menu will pop up from which you select the type of the new connection (see below), and the configuration dialog for the new connection will be opened.
- Configure: Open the configuration dialog of the selected connection. You can also double-click the entry in the list.
- Remove: Remove the selected connection from the configuration. This only removes the connection, not the database itself or its contents.
- Test: Try to connect to the selected database, and display a message if the connection was successful (or an error message otherwise).
- Export:
Save the selected connection(s) to an
.inifile. - Import:
Add the connection(s) from a previously exported
.inifile to the list.
Import and Export are useful when setting up multiple computers that connect to the same database: Configure and test the connection on one computer, export it, and import it on all other computers.
Each mAirListDB database has a unique Database ID, which is stored in the configuration along with the connection. If two or more connections with the same ID are configured (e.g. because you imported the same connection twice), an error will be logged to the System Log at startup. Remove the duplicate connection in this case.
Connection Types
The following connection types are available from the Add… menu.
All connection types have an Advanced tab in their configuration dialog, where you can set a Custom Caption for the connection. This caption is used for the database throughout the mAirList GUI, e.g. in the list on this page and as the title of the database browser.
mAirListDB (Local Mode) and mAirListDB (SQL)
These are the connection types for the built-in mAirList database, either
stored in a local .mldb file, or on an SQL server (PostgreSQL, MySQL/MariaDB, or
Microsoft SQL Server).
Creating or connecting a database, as well as all settings of these connection types, are described in detail in the Database Setup chapter.
mAirListDB (Internet Client)
This connection type is used to access an mAirListDB database from outside the local network, through mAirList DBServer. On the Database Server tab, enter the host name or IP address, port, and (optional) path of the DBServer, and check Use SSL/HTTPS if the server is set up for encrypted connections.
Please see the Remote Access chapter for more information on DBServer and the client configuration.
iTunes
This connection type gives read-only access to an iTunes (or Apple Music) library, by reading the library XML file exported by iTunes.
- iTunes Music Library.xml File: Select the location of the XML file.
- Path Substitution: If the file locations stored in the XML file are not valid on this computer (e.g. because the library was created on a different computer), you can replace the beginning of each path. Enter the original path prefix in the Replace… field, and the replacement in the With… field.
- Hourly Playlist Pattern:
iTunes playlists whose name matches this pattern will be used as hourly playlists,
e.g. when the playlist for the next hour is loaded automatically.
The pattern may contain logging variables for the
date and time, for example
mAirList-%Y-%M-%D-%h(the default). The Resolves to label shows the playlist name for the current hour.
The XML file is read when the connection is established. To make changes in iTunes available to mAirList, the database must be reconnected.
SAM Broadcaster v4
This connection type gives read-only access to the song list of a SAM Broadcaster v4 database. On the Database Connection tab, enter the SQL connection parameters (protocol, host name, database, user and password) of the SAM database.
The songs are presented in the database browser grouped by artist, and can be searched and dragged into the playlist.
MusicMaster Nexus Server
This connection type connects mAirList to the MusicMaster scheduling software, through the MusicMaster Nexus API. See MusicMaster Integration for an overview of the different ways to use MusicMaster with mAirList.
Before adding the connection, the Nexus API must be set up on the MusicMaster Nexus sub-page (see below). In the connection configuration, the following settings are available:
- General tab:
- Nexus API: Click Select… to choose one of the APIs (servers and stations) set up on the MusicMaster Nexus sub-page.
- Options:
- Reconciliation (report song start/stop): If enabled, mAirList will report the start and stop of each song back to MusicMaster.
- Disable automatic update of MusicMaster fields for new files: By default, mAirList will update the MusicMaster fields (e.g. cue markers) when new files are added. Check this option to disable this.
- Library tab:
- Song Metadata Source:
Where the mAirList-specific metadata of the songs (cue markers etc.) is read from and
stored:
- MusicMaster (read/write): Read from MusicMaster, and changes are written back. Fields without a mapping are stored as an XML block in the field mapped as XML Metadata.
- MusicMaster (read-only): Read from MusicMaster, but never written back.
- Other database (by Internal ID) / Other database (by External ID): The metadata is taken from another database connection; only the schedule comes from MusicMaster.
- Other database:
For the Other database modes: the Database to retrieve the metadata from (or
(First active connection)), and the ID pattern that is used to look up the item.
Available variables are
$SONGID(the MusicMaster song ID),$DBID(the value of the field mapped as database ID), and$VERSION(the version, see below). If the ID must be extracted from the database ID field, enter a regular expression under DBID RegEx; the first match becomes$DBID. - Versioning: The XML attribute of the schedule entries that contains the version of a song, and the Default version for entries without it.
- Song Metadata Source:
Where the mAirList-specific metadata of the songs (cue markers etc.) is read from and
stored:
- Content tab:
- Advertising:
Log notes whose title starts with the specified prefix are treated as advertising
placeholders, and the advertising blocks are imported from the configured
Import source. A number after the prefix is the block number, e.g.
Traffic 15imports block 15. - External Content:
Log notes whose title starts with the specified prefix refer to a playlist file,
e.g.
EXTERNAL news.m3u, which is loaded from the specified folder (unless an absolute filename is given). - Region Suffixes: If Regionalization is used, enter the filename suffix used for each region (see MusicMaster Integration).
- Advertising:
Log notes whose title starts with the specified prefix are treated as advertising
placeholders, and the advertising blocks are imported from the configured
Import source. A number after the prefix is the block number, e.g.
- Colors tab:
If a MusicMaster field is mapped as Color, enter the colors for its values, one per
line, in the form
<value>=<HTML color>, e.g.A1=#FF0000.
See also the MusicMaster actions, which can be used to synchronize the playlist with the MusicMaster schedule.
Script
This connection type lets you implement your own database connection with a script. Select the script file on the Settings tab.
The script must implement the functions CreatePlaylistItem (create a playlist item
from an item ID) and SavePlaylistItem (save changes to an item back to the database).
The following optional functions may be implemented to provide further features:
GetCapabilities, Connect, Disconnect, IsConnected, ConnectionAlive,
SearchItems, GetPlaylist, ExecuteSQL, FillDatabaseTree, and ReverseLookup.
MusicMaster Nexus
On the MusicMaster Nexus sub-page, you set up the connections to one or more MusicMaster Nexus API servers, which are then referenced by the MusicMaster Nexus Server database connections and the MusicMaster playlist importer.
The configuration dialog of each API has the following tabs:
- General:
- Nexus Server: The URL of the Nexus server, the HTTP and Nexus usernames and passwords, and an optional alias (caption) for this API.
- Audio Folders: The folder where the audio files referenced by MusicMaster are stored, and an optional cache folder. Check Store absolute filenames in MusicMaster database to store full paths rather than paths relative to the audio folder.
- Databases: The MusicMaster primary/child database to use, and, for MusicMaster Enterprise setups, the Enterprise Master database (leave empty for non-enterprise setups).
- Field Mapping: Determines which MusicMaster fields correspond to the mAirList system fields (artist, title, etc.), attributes, and cue markers.