Skip navigation.
 
mlRe: iTunes Radio Tuner
FROM : Max Gebhardt
DATE : Tue Apr 26 06:50:53 2005

Yaw,

On Apr 25, 2005, at 3:13 AM, Cornelius Jaeger wrote:

> you can use tcpflow (download from fink for example)
> to see where iTunes gets the info.


Take a look at this info from Willem H. at 
http://www.xs4all.nl/~itsme/projects/misc/itunes.html.  The work's 
already been done for you:

GET http://pri.kts-af.net/xml/index.xml?username=AppleApp1
   which returns an xml document, asking for authentication with 
'CRAM-MD5'
GET http://pri.kts-af.net/xml/index.xml?sid=[ ... ]&tuning_id=-12
   returns the top level genre list
GET http://pri.kts-af.net/xml/index.xml?sid=[ ... 
]&tuning_id=8090&show_field[]=description&show_field[]=long_description&
show_field[]=num_users&show_field[]=max_users
   returns the list for 'electronica'
GET http://pri.kts-af.net/redir/index.pls?esid=[ ... 
]&url_no=1&client_id=7&uid=[ ... ]&clicksrc=xml
   then redirects to the actual radio station

CRAM-MD5 is detailed in this RFC: 
http://www.faqs.org/rfcs/rfc2195.html.  Until you've implemented the 
authentication, you can skip that step as long as the sid is good.

I think 3Com and/or Apple may have some issues with other software 
using this service.  iTunes' SLA states that "you may not ... send 
automated queries to Kerbango's system without express permission from 
3Com".  Just something to keep in mind.


On Apr 25, 2005, at 3:13 AM, Cornelius Jaeger wrote:

> On Apr 24, 2005, at 8:51 PM, Yaw Anokwa wrote:
>

>> I could parse those sites but I don't believe those are the stations 
>> Apple uses. For example radioiojazz.com is on the listing in iTunes 
>> but not in Icecast or Shoutcast.


That's true.  But just to clarify, a significant portion of the 
stations listed in iTunes /can/ also be found on Shoutcast.com.


On Apr 24, 2005, at 3:31 PM, Lance Drake wrote:

> If I'm not mistaken, the list is fetched at runtime from some Apple 
> server.


Actually, the list of stations for a genre is fetched at the time that 
you first click the genre's disclosure triangle.  (Notice that iTunes 
displays "Contacting tuning service..." in its status box.)


On Apr 24, 2005, at 1:43 PM, Yaw Anokwa wrote:

> I'm trying to build an application that parses and displays the radio 
> listings in iTunes. Just wondering if anyone knows where the listing 
> from? I figure it's XML but from where?


In addition to the options already mentioned, AppleScript may be able 
to help here by grabbing the data from iTunes.  One problem with this 
method is that, to my knowledge, a script is only capable of grabbing 
stations that the user has already loaded (by clicking on the 
disclosure triangles).

--Max

Related mailsAuthorDate
mliTunes Radio Tuner Yaw Anokwa Apr 24, 19:43
mlRE: iTunes Radio Tuner Lance Drake Apr 24, 21:31
mlRe: iTunes Radio Tuner Cornelius Jaeger Apr 25, 09:13
mlRe: iTunes Radio Tuner Max Gebhardt Apr 26, 06:50
mlRe: iTunes Radio Tuner Yaw Anokwa Apr 27, 07:57