Add a history url
A example url would be: http://127.0.0.1:8000/playing.json?mount=/live
The following is the minimum amount of information that a Webplayer or Website/Forum plugin/Blob plugin would need:
{
"server_name":"Testing Stuff",
"server_description":"Blah blah blah",
"history":
[
{"date":"2017-03-03T10:52:10Z","artist":"Some artist","title":"Some song (this is the current one)"},
{"date":"2017-03-03T10:48:10Z","artist":"Some other artist 2","title":"Some Song 2"},
{"date":"2017-03-03T10:44:10Z","artist":"Artist 3","title":"Song 3"},
{"date":"2017-03-03T10:40:10Z","artist":"Artist 4","title":"Song 4"},
{"date":"2017-03-03T10:36:10Z","artist":"Artist 5","title":"Song 5"},
{"date":"2017-03-03T10:32:10Z","artist":"Artist 6","title":"Song 6"},
{"date":"2017-03-03T10:28:10Z","artist":"Artist 7","title":"Song 7"},
{"date":"2017-03-03T10:24:10Z","artist":"Artist 8","title":"Song 8"},
{"date":"2017-03-03T10:20:10Z","artist":"Artist 9","title":"Song 9"},
{"date":"2017-03-03T10:16:10Z","artist":"Artist 10","title":"Song 10"}
]
}
The server_name and server_description is included since those could change between DJs (and are nice to display in the webplayer to the listener).
The date for each song (ISO 8601 standard) is somewhat useful, not only can a webplayer show the start time for each song to the listener but (with the exception of the current song) it can calculate and show the duration of songs which a listener or visitor may find interesting.
JSON is convenient as it would need next to no processing by a server script before being passed to a Webplayer or used on a webpage via XHR.
Now as Icecast uses XML internally (mentioned on the icecast-dev mailing list recently) a alternative could be:
A example url would be: http://127.0.0.1:8000/playing.xml?mount=/live
And the following content:
<?xml version="1.0" encoding="UTF-8"?>
<source mount="/live">
<server_name>Testing Stuff</server_name>
<server_description>Blah blah blah</server_description>
<history>
<track>
<date>2017-03-03T10:52:10Z</date>
<artist>Some artist</artist>
<title>Some song (this is the current one)</title>
</track>
<track>
<date>2017-03-03T10:48:10Z</date>
<artist>Some other artist 2</artist>
<title>Some Song 2</title>
</track>
<track>
<date>2017-03-03T10:44:10Z</date>
<artist>Artist 3</artist>
<title>Song 3</title>
</track>
<track>
<date>2017-03-03T10:40:10Z</date>
<artist>Artist 4</artist>
<title>Song 4</title>
</track>
<track>
<date>2017-03-03T10:36:10Z</date>
<artist>Artist 5</artist>
<title>Song 5</title>
</track>
<track>
<date>2017-03-03T10:32:10Z</date>
<artist>Artist 6</artist>
<title>Song 6</title>
</track>
<track>
<date>2017-03-03T10:28:10Z</date>
<artist>Artist 7</artist>
<title>Song 7</title>
</track>
<track>
<date>2017-03-03T10:24:10Z</date>
<artist>Artist 8</artist>
<title>Song 8</title>
</track>
<track>
<date>2017-03-03T10:20:10Z</date>
<artist>Artist 9</artist>
<title>Song 9</title>
</track>
<track>
<date>2017-03-03T10:16:10Z</date>
<artist>Artist 10</artist>
<title>Song 10</title>
</track>
</history>
</source>
The XML is not quite as elegant as the JSON but it gets the job done and I'd rather see it as XML than never as JSON.