Where can I find information on parsing the iTunes Library?

Discussion in 'Mac Programming' started by KelchM, Jan 24, 2009.

  1. KelchM macrumors regular

    Aug 17, 2007
    Hey guys.

    I'm currently toying with the idea of a new project that would allow me to take the lossless itunes library on my desktop, transcode the music into a lossy format and then copy it to a laptop.

    This would also allow me to have a copy of my entire music library, albeit at lower quality. Ideally I'll also be able to maintain the same podcasts subscriptions on both systems.

    Another benefit of this would be that I could sync my iPhone to this lossy library. This is appealing as it makes little sense to me to carry lossless audio on a dap.

    To get started I just want to learn how to work with the iTunes library. Anyone know of any resources I can use to get started?
  2. kainjow Moderator emeritus


    Jun 15, 2000
    iTunes stores a copy of its database in a normal property list format, so if you're using Cocoa it'd be easy to read. Just open the "iTunes Music Library.xml" file in Property List Editor to see how it's organized.
  3. hhas macrumors regular

    Oct 15, 2007
    Assuming the OP's using Cocoa, I believe the iMedia framework knows how to read the "iTunes Music Library.xml" file.

    There's also iTunes' Apple event ("AppleScript") interface, of course, though if read-only access is all that's needed then the XML file is probably the cleaner option.

Share This Page