3

My old Macbook with Mavericks crashed and got a new Macbook with Yosemite. I want to recover from the old Mac the information about which songs I used to listen and number of times they were played, how can I recover that info?

2

Where does iTunes store information about songs listened and number of times?

In the Windows version of iTunes that information is in iTunes Music Library.xml

Each track in the library has entries like:

<key>Play Count</key><integer>2</integer>
<key>Play Date</key><integer>3354642445</integer>
<key>Play Date UTC</key><date>2010-04-20T20:07:25Z</date>

...

<key>Name</key><string>Into Blue</string>
<key>Artist</key><string>Aethera</string>
<key>Composer</key><string>J. Deere</string>
<key>Album</key><string>The Gaelic Mystery</string>

So this track was played twice. The play count is only updated if you play the whole track from start to finish.


About iTunes library files

About the iTunes Library.itl file

The iTunes Library.itl file is a database of the songs in your library and the playlists that you've created. Some song-specific data is saved in this file. If you delete this file, iTunes creates a new, empty copy the next time that you open it. Your playlists, song ratings, comments, or other information is lost. The iTunes Library.itl file is used only by iTunes, and is the only one backed up by Time Machine on OS X.

New versions of iTunes sometimes include enhancements to the iTunes library. When you open a new version of iTunes, iTunes updates your existing library to the new format and places a copy of the old library in the Previous Libraries folder.

About the iTunes Library.xml file

The iTunes Library.xml file contains some, but not all, of the same information that's stored in the iTunes Library.itl file. The purpose of the iTunes Library.xml file is to make your music and playlists available to other applications on your computer, such as iPhoto, Garageband, iMovie, and third-party software, in OS X Mountain Lion and earlier. These applications use this file to make it easier for you to add music from your iTunes library to your projects.

If you're using OS X Mountain Lion or earlier or a third-party app that uses the XML file, you need to enable Legacy library XML support:

  • Open iTunes.
  • From the menu bar at the top of your computer screen, choose iTunes > Preferences.
  • Click the Advanced tab.
  • Select "Share iTunes Library XML with other applications."

Source About iTunes library files

  • I found it, thanks! And now, how could I get the list of the most played albums? – Open the way Sep 20 '15 at 21:41
  • @flow I don't think that is very easy as the xml file contains data for individual tracks. You would need some clever code to parse the xml file and do some calculations based on the album name and how many times each track was played. Repeat for each album. – DavidPostill Sep 20 '15 at 21:45
  • @flow You have to use a smart playlist for that. If you already had one that would be in the same file. Unfortunately the playlist entries are harder to decode. They are at the end of the file after all the tracks in your library. – DavidPostill Sep 20 '15 at 21:59
  • @flow You might find something here if you know applescript AppleScripts for Apple's iTunes – DavidPostill Sep 20 '15 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.