Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Creating configuration file

Finn Lis edited this page Sep 28, 2019 · 1 revision

Configuration location

By default Arizona searches for configuration in this order:

  • ./cfg.json (executing directory, the same as "$PWD/cfg.json")
  • /etc/arizona.json

It can be overridden by "-c {path}" or "--use-config {path}" argument. eg. "arizona -c /home/finn/.config/arizona.json"

Configuration file contents

Terminal output

  • color - boolean, it can be either 1 for true or 0 for false. Value true/1 will allow i_output function to print out colored messages, otherwise (false/0) it will output messages as usual, except they won't be formatted to use any color.

  • silence-warnings - also boolean, it can be either 1 for true or 0 for false. It's also responsible for printing out messages. If set to 1/true it will hide debug messages (with [DBG] prefix), previously in alpha stage known as warnings (with [WARN] prefix). Useful for people that want to hide some spam in console.

Database

  • db-host - IPv4 address of MySQL server. If you wish to not use this, leave the default settings or empty variables and move on to "use-mysql variable.*

  • db-name - Name of the database.

  • db-user - User for accessing database. It's recommended to not use root or any overprivileged account.

  • db-pass - Password for the user above.

  • db-port - Port of the MySQL server (usually it's 3306, but it's common to use custom one for security reasons)

Icecast

  • shout-host - IPv4 address of Icecast2 server.

  • shout-port - Port for the Icecast2 server. (usually it's 8000)

  • shout-frmt - Format of sent audio. Possible values are "MP3" and "OGG", but OGG may not work properly at this time, other formats supported by libshout library are to-do.

  • shout-mnt - Mountpoint used on Icecast2 server.

  • shout-user - User used to log into Icecast2, it's recommended to use custom user for mountpoint instead of "source".

  • shout-pass - Password for the user above.

Playback

  • random - Either 1 for true or 0 for false. If true, playlist will be shuffled to avoid songs repeating in the same order. Previously it was "song-play-mode" and also supported alphabetical sorting, but it was dropped due to uselessness.

  • use-mysql - If 1 (for true) it will search for the next song inside "queue" table on selected MySQL database, it will get the oldest occurrence and delete it afterwards and play it instead of next song on the local playlist. It's used for song ordering on internet radios. Use value 0 to skip checking.

  • audio-directory - Full path to directory with songs to be played. You can edit the playlist anytime without restarting Arizona as she will rescan the directory on first access error (for example after the file was deleted). Make sure that Arizona has read permissions to each file.

  • repeat - If set to 0, the program will safely disconnect and exit after the entire playlist was played. If set to 1, the program will just repeat it indefinitely.

Bumpers

  • play-bumpers - Either 1 for true or 0 for false. If 1 the program will scan the directory set below for directories with name equal to "ThisHour_MinutesNow", for example "14_10" if it's 10 minutes after 2PM, then it will play file called exactly "bumper.mp3" inside that directory. If program hasn't found such folder it will search for "random" directory, and if it exists it will get the list of files inside it and get random file from it. It will play it before the next song in the playlist if the randomly generated integer from 1 to 100 is bigger than the value specified in "bumper-chance". Set it to 0 to tell the program to skip it. See also "Bumper directory structure" page on this Wiki.

  • bumpers-path - Full path to catalogue with directories of specified bumpers and/or random directory. See also "Bumper directory structure" page on this Wiki.

  • bumper-chance - Number from 1 to 100. 1 - very unlikely to play bumper, 50 - play bumpers sometimes, 100 - play bumpers instead of songs.

Metadata (Public data sent to Icecast)

  • stream-name - Name of the stream, should not be empty.

  • stream-url - URL address to the radio website.

  • stream-genre - Genre of played music. Shouldn't be empty, set to "various" if not needed as it is Icecast default.

  • stream-desc - Stream/radio description. If you don't have an idea what to put there, you can leave "Powered by Arizona (https://github.com/tlpr/arizona)" as it will be very appreciated.

  • stream-irc - Address of the IRC server and link to the channel related to this stream or radio station. Kind of not functional yet.