Late night fiddling, don’t ask why– I was doing my photo editing and saw nothing on #ds106 radio, so set out to play somethimg from iTunes. For some reason, Nicecast no longer allows me to select an application as a source (Maybe because I installed Audio Hijack), so I switched by rig to Ladiocast, especially since the ds106 radio status page was not updating at all. Previously, I found I could manually push updates to the metadata via Ladiocast, but this seems manual and tedious.
I mused before searching
Not quite sure anymore what generates metadata on #ds106radio, NIcecast fails
— Alan Levine (@cogdog) March 31, 2013
It’s pretty easy to see what it does; polls itunes for a new song, and if it is different from the last, it updates the meta data thingie in Ladiocast. The other feature I like is that it tests if iTunes has stopped playing, and if so, it plays a short playlist (as a signoff audio) and stops the stream. This means, you could set up a show as a playlist, let it rip, and go outside or sleep, and it will end gracefully (no snorecasts).
First I made a short recording to be the signoff, and added to a new itunes playlist “radio off”
I then looked at the script and decided to fiddle– it would be nice to add something to the meta data beyond the song title, like a #ds106radio tag, etc. So I modded the script to provide text input to add an option meta data prefix, and suffix.
set lastName to ""
set lastArtist to ""
set lastAlbum to ""
set currentState to ""
set thePrefix to the text returned of (display dialog "Starting text for stream e.g. '@cogdog playing'" default answer "")
if thePrefix is not "" then set thePrefix to thePrefix & " "
set theSuffix to the text returned of (display dialog "Ending text for stream, e.g. 'LIVE on #ds106radio'" default answer "")
if theSuffix is not "" then set theSuffix to theSuffix & " "
tell application "iTunes"
set currentState to player state
if currentState is stopped then
play playlist "radio off"
tell application "LadioCast"
set trackName to name of current track
set trackArtist to artist of current track
set trackAlbum to album of current track
if trackName is not lastName or trackArtist is not lastArtist or trackAlbum is not lastAlbum then
set lastName to trackName
set lastArtist to trackArtist
set lastAlbum to trackAlbum
tell application "LadioCast"
set metadata song to thePrefix & "'" & trackArtist & " - " & trackName & "'" & theSuffix
I saved it as well as a stand along app if you do not want to script fiddle. The idea is you would start a stream, run a playlist as audio, and then launch this app to manage the metadata pushing.
When you start up the app, you can add the prefix and suffix (it is optional)
and the script automagically updates the Ladiocast metadata (and looks like triggers the update too)
It does work, though I wonder if i ends up a bit twitter spammy if I include my handle or hash tags
Anyhow, this is just a bit of fiddling ‘n futzing. Maybe its of use to someone.