Search code examples
itunes

Access to iTunes Ratings Data


We want to write a Windows/OS X app that sends podcast ratings info from an iPod and iTunes back to a server. Two questions:

  1. Is there documentation for how ratings data are stored in iTunes,
  2. if a user has iTunes set to auto-delete programs he has heard, is there a way to capture the ratings data before it's gone?

Solution

  • itunes stores its Music Library data and Ratings in an XML file on the user's machine. In windows its located in the "Music" or "My Music" folder.

    You can open the "iTunes Music Library.xml" file and look for the Rating element to see what the user rated each song. Since its XML, it's pretty self-explanatory. That should be pretty easy to open and parse from the program you're writing.

    I think iTunes doesn't remove the podcasts from its xml file until the program is closed. You should be able to grab that rating data as long as itunes is still open.