iTunes Internet Radio metadata

Posted on
Mon May 07, 2018 8:08 pm
Monstergerm offline
Posts: 274
Joined: Sep 01, 2009

iTunes Internet Radio metadata

I sometimes listen to Internet Radio stations on iTunes (the old fashioned ones listed under 'Internet Radio'.
The official iTunes plugin does not support them, it lost Playlist support long time ago and it puts the Internet Radio Station name into the Track field.
I can however get the required metadata via Applescript (current stream title). I modified the iTunes Local Control plugin to put this information into a variable.

In other words I have a variable that holds the stream title (Artist & Song name). My question is, how do I keep this variable updated?
I need something like this: if iTunes is playing and Playlist is "Internet Radio" then update this variable with the current stream title every lets say 10 seconds. I can't use any triggers here since the iTunes device via the official iTunes plugin does not support streaming titles.

What would be a good way to have some repeat timer run conditionally while above is true and update the variable?

Posted on
Tue May 08, 2018 7:12 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: iTunes Internet Radio metadata

Hi Mostergerm.

Support for streams in the iTunes Local Control plugin is a good idea - I'll add it to the list.

For your specific situation, I would run a schedule to put the current playlist in a variable. A second schedule could get the current stream title, but only if the playlist variable is "Internet Radio".

Posted on
Tue May 08, 2018 3:37 pm
Monstergerm offline
Posts: 274
Joined: Sep 01, 2009

Re: iTunes Internet Radio metadata

perfect! this works.

If you want to implement in your plugin, this is what I found out:

Code: Select all
tell application "iTunes"
   set myPlaylist to name of current playlist -- becomes 'Internet Radio' with radio
   set myAlbum to (get album of current track) -- missing value with radio
   set myArtist to (get artist of current track) -- missing value with radio
   set myTrack to name of current track -- becomes Radio station name
   set mystreamTitle to current stream title -- missing value with Music;  Artist & Song with radio
   set mystreamURL to current stream URL -- missing value with Music;  URL of radio station
end tell

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests