Author Topic: External Text Sources: Get "now-playing" information from RadioBOSS via HTTP API  (Read 13 times)

Jan

  • Hero Member
  • *****
  • Posts: 1322
SIMPLE TUTORIAL

In this tutorial, we'll look at how easy it is to use a broadcast automation system's HTTP API to retrieve information about the song currently playing. This is a more modern and secure method than sharing information via a text file.

The condition is that the broadcast automation system allows this option. We will demonstrate this on the RadioBOSS system, which returns an XML structure containing all the necessary information about the current song via the API.

We will assume that you have already made the basic settings in the Magic RDS 4. In particular, a working connection to the RDS encoder or encoders is required. It is necessary to create a new Output, a new text Source, and assign (insert) this Source to the Output. Select the Radiotext destination. See other tutorials for details.

Now we can proceed as follows:

  • Enable the HTTP API in RadioBOSS. Note the port and password.
  • Try the API output in any web browser. Yes, it's really so easy. On the same PC the API address is usually localhost:<port>/? followed by password and keywords, as described in the API documentation. In this case the full URL is
    http://localhost:9000/?pass=1234&action=playbackinfo
    The API commands may be different for each broadcast automation system. For access from another PC, type its IP address instead of localhost.
  • Configure the Magic RDS text Source as showed on the picture below.
  • Don't forget to turn on the RT+, as every station should be using this feature these days.

This was a simple example. For most cases this will suffice. In the next post, we will show an advanced usage.

Jan

  • Hero Member
  • *****
  • Posts: 1322
ADVANCED TUTORIAL

The previous example was simple, because we only read simple information about the currently playing song. This information was compiled for us by RadioBOSS based on the name of the music file or the included tags.

Sometimes it can be useful to compile the text information according to your own criteria directly in the Magic RDS. However, this cannot be taken as a general recommendation, because it all depends on how carefully the songs are named in the music file database.

The following example reads the song title and the artist name separately. If these fields are empty, the name compiled in RadioBOSS is used (usually the file name). Next, we read the playback status. If playback is paused or stopped, the song title will not be displayed. Instead, a fixed text will be displayed. But it is possible to add the %GOTONEXT% command instead of this text and the text Source will be skipped in the Output loop until the music starts playing again.

Please note that this example requires the latest version of Magic RDS 4.