Monday, May 9, 2011

Hmmm.... No file.

I see that the file download is no longer available at the google group. When I get around to it, I'll figure somewhere to host it and post a link. I've also updated it so that it doesn't have problems with empty album and song names.

Thursday, July 24, 2008

iTunes Merger 1.0

I've created a quick-and-dirty application to merge ratings and play counts from one iTunes Library into another. Although it's a Java app, it works only on Macs (due to the fact that it uses Applescript to interact with iTunes).

What you need to use it is the xml library file from 1 library ("source") (usually called "iTunes Music Library.xml", from which you'd like to import ratings and play counts. You then reference the xml library file on your computer where you'd like to import into ("target"). This will update your iTunes library file (in addition to the xml file). You may want to back up both the xml file and the library file ("iTunes Library") before running. These files are found in /Users/(username)/Music/iTunes, or through Finder in Music/iTunes.

Quick instructions for use: a zip file is provided. The zip file contains a shell script and a jar file. Download the zip file, and unzip it into any location. Run the shell script mergeLibraries.sh either by opening a terminal window and executing it directly. If you download your files onto your desktop, you can open terminal.app (in Applications) and type the following commands:

cd Desktop
unzip iTunesMerger_1.0.zip
./mergeLibraries.sh <path-to-source-file>
"/Users/(username)/Music/iTunes/iTunes Music Library.xml"
-a

(no return on the mergeLibraries.sh command, and (username) represents the username of your user. If you're unsure of your username, type whoami).
The -a option (must be last argument) causes the merger to add play count from source library to target library. Without the -a option, the source play count replaces the target play count.

A message saying that an error occurred will appear for any tracks not able to update (this can happen when song or file doesn't exist in target).

This is tested in iTunes 7.7.

This is a pretty quick description, and I'll update it with more detail and better explanations as time allows. As this is quick-and-dirty software at this point, please back up your itunes library files before running this if you care about what's in them!

Let me know how it goes. The file download link at the right takes you to the files page of a Google group, where the download is available.