Personal tools

How to get now playing information into a text file

From Rivendell Wiki

Jump to: navigation, search

Q: Do you think one of you can walk me through getting RDAirPlay to spit out a now playing.txt so we can feed this info to our website?

A: If you would like to create a playing.txt file in the /var/web directory of the local machine with the song title followed by the artist name separated by a dash you can do the following.

Go to RDAdmin>Manage Hosts> select the host >Edit>RDAirplay>Configure Now & Next Data>Master Log>RML> and enter this:

RN echo %t - %a > /var/web/playing.txt!

If you want other information other than artist and title change the placeholders. You can even grab info about what will be playing next. See this wiki page for more info about the place holders.

You will need to make sure that the directory (/var/web in our example) is writable by the Rivendell Linux user so it can write to the file at each audio start. Each time audio starts this file will be overwritten with the info about the current song and possibly the next if you set it up that way.

Note: Only audio in groups that are enabled for Now & Next data will be sent to the file. See the section of this wiki page titled ENABLING AUDIO.