How to extract select iTunes metadata? play count, date added, etc.

Discussion in 'Mac Apps and Mac App Store' started by Spotless, Jan 5, 2010.

  1. Spotless macrumors member

    Joined:
    May 30, 2007
    #1
    I've just set up my new uMBP (I know, I should have waited for the new chips, but hey - I got impatient!)

    I have moved my itunes media to the new machine but it is lacking all ratings, the original 'date added' as well as play counts. In fact, I have left all the old metadata behind, but these are the only three parts I'd like back.

    What I'd like to know is if there is a utility or mini app that can extract this kind of data from my old library file and add it to my new one.

    I would have just moved the original library file but I have done that since iTunes 1 and the library file has become a bit messed up. I am rather enjoying my shiny new library file - I just want my ratings, 'date added' and play count metadata injected back in!

    I love the playlist trick for the ratings but this is no good for 'date added' or play count obviously.

    Any ideas? Thanks guys. :D
     
  2. richard.mac macrumors 603

    richard.mac

    Joined:
    Feb 2, 2007
    Location:
    51.50024, -0.12662
    #2
    all the metadata is inside the iTunes folder which is inside the iTunes Music folder. just move that whole iTunes Music folder and you should be sweet.
     
  3. Spotless thread starter macrumors member

    Joined:
    May 30, 2007
    #3
    Thanks mate, but:

    I was hoping for a 'metadata extractor / editor' type utility.
    I have had no luck finding one so was hoping that someone might know of a groovy homebrew / open source effort.
     
  4. Spotless thread starter macrumors member

    Joined:
    May 30, 2007
    #4
    I'm still looking for a utility like this. I'm not sure that one exists.

    I'm amazed. I wonder why no one has written one.

    Praps juggling multiple library files is more niche than I thought it would be.
     
  5. Mumford macrumors regular

    Joined:
    Oct 8, 2006
    Location:
    Altadena, CA
    #5
    All that data appears to be stored in ~/Music/iTunes/iTunes Music Library.xml. It's a text file, so parsing it with any scripting language should be trivial.
     
  6. mysterytramp macrumors 65816

    mysterytramp

    Joined:
    Jul 17, 2008
    Location:
    Maryland
    #6
    AppleScript might help. You might try checking Doug's Applescripts for iTunes.

    If he doesn't have what you want/need, it would be pretty easy to roll your own script. iTunes AppleScript dictionary says the date added property is r/o, so AS won't help here, but it appears you can edit ratings and the play count.

    mt
     
  7. Spotless thread starter macrumors member

    Joined:
    May 30, 2007
    #7
    Mumford: Yeah. The file you mention is almost certainly where that data is kept. However, as soon as you mention 'parsing' and 'scripting language', my heart sinks! That all sounds like a bit too much heavy lifting! These things are not my field so I would need to start from scratch. Interesting to note that it may be trivial, though. If I wanted to learn these things, any idea where I'd start?

    Mysterytramp: Thanks for the link. I had had a look through his site and I have found a couple of scripts that MAY do the trick with a bit of fiddling. They are designed to work with the metadata from a single library though, so I'm not sure if I can load one library, copy the metadata, open the new library and copy the data back in. I'll have to have a look.

    This iTunes AppleScript dictionary sounds like a good resource. I'll have a look for that, cheers.

    I think I need to take the hint and learn how to hack some AppleScripts together!
    And yeah, if its any good (read: if it works!), I'll post it on Doug's site.

    Thanks for your thoughts guys.
     

Share This Page