You are here: Start -> this page
Since I have a lot of automatic playlists based on play count, not losing the play count data was decisive when I had to move my iTunes library from a workstation to a server. However, if you just move the folder and export/import the iTunes library, exactly one thing is lost, the play count. The way to keep the play count intact is to first change the location of the iTunes libary in your prefs, and then use the Advanced -> Consolidate Library menu option. However, this method requires that you have organized your music the way Apple suggests.
For me, the Apple way of organizing my music is not flexible enough. In my music folder, I have a few subfolders, e.g., My albums, Demos, Bootlegs etc. The reason for this is that I want to apply different sharing restrictions on each directory. For example, the My albums-folder everyone on the computer may read, the Demo-folder is OK to share on Gnutella or DC, but no one but me must be allowed to listen to my bootlegs. The folders are organized like this:
MusicMy albums (below I will refer to this level as the root)Name of artist/composerAlbum name01. Trackname.mp3
02. Trackname.mp3
I handle compilations slightly different, I have a separate folder for them named Compilations:
MusicMy albumsCompilationAlbum name01. Artistname - Trackname.mp3
02. Artistname - Trackname.mp3
In the compilations case, I do not think it makes sense to have a a lot of artist folders with only one track in them. I typically have a lot of compilations from independent record companies with a lot of bands that never released more than an occasional track or two.
The big questions now is how to migrate this setup and keep the play count. I found a way that worked to about the 95% level (see caveats at the end about the missing 5%).
First one has to be aware of how iTunes traces the tracks in its library. By experimenting a little, I found that first it looks for inodes and as fallback if the inode is not available, it looks for the file's path. I don't know if there are any further fallbacks.
Secondly, one also has to be aware of what iTunes does when it consolidates the library; when consolidating the library, iTunes looks at the ID3 tags of all tracks in its library it can find, and creates a hierarchy like this:
MusicName of artist/composerAlbum name01. Trackname.mp3
02. Trackname.mp3Unknown artist [for tracks without ID3-tags]Unknown albumTrackname.mp3
Trackname.mp3
Please note that the My albums-level is removed. In addition, iTunes leaves the name of the tracks untouched. Simply consolidating the libary would, in my case, therefore have caused an unacceptable result, since the first level of separation (My albums, Demos, Bootlegs and a few more) would have disappeared.
The solution was to consolidate one root level (My albums, Demos, Bootlegs etc) folder at a time. However, it was not that easy. I realized this after my first attempt, when I simply moved the other root level folders to another location on the same partition and found that iTunes still kept track of the files in these folders, due to their inodes, and therefore, consolidated them toghether with the My albums-folders.
To force iTunes to temporarily forget about the files in the other root folders, I had to duplicate them, and delete the original folder. Now I had something that looked like this:
MusicMy albums
Demos (copy)
Bootlegs (copy)
Consolidating now leads to only the My albums-folder being consolidated. Obviously, you have to re-create the hierarchy on the receiving computer and volume. That is, when you changed the path to the iTunes library, you cannot change to /Another volume/Music when you consolidate the My albums-root folder. Rather, you have to point it to /Another volume/Music/My albums.
After consolidating My albums, I duplicated this directory on the original volume and deleted the the original folder to be sure that the inode number changed. You should not need to do this, but I was so annoyed after working with this for a week so I felt »better safe than sorry». However, what you need to do is duplicate the My albums-folder and then delete the original folder in its new location to break the inode connection. The folder hierarchy must look something like this after consolidating the My albums-folder and preparing to consolidate the Demos-folder:
[old location]MusicMy albums (copy) [the probably not necessary step][new location]
Demos [rename it back to its original name so iTunes' paths works]
Bootlegs (copy)Music My albums (copy) [to break the inodes]
Demos [an empty folder to which you point iTunes library prefs]
Now iTunes finds everything in the Demos-folder and has lost track of the My albums-folder (both on the original and the new location). iTunes also has lost track of the Bootlegs-folder in the original location. To distill this process:
MusicMy albums (copy)
Demos (copy)
Bootlegs
Start iTunes and see that all warnings about missing songs are gone. To be completely sure that the consolidation really worked, you can quit iTunes again and unmount the volume with the original Music folder on it, and then start iTunes again. To find any missing tracks, you use a script, e.g., List MIA:s which you can find on malcolmadams.com/itunes/
Now I only miss one feature in iTunes -- improved intelligent playlists that lets you create playlists with the 25 most played songs minus the ten most played songs. This way your playlist would automatically compensate with new songs rather than today's situation where most played playlists just increse the tendency of a track being played frequently, which leads to a situation where you get bored of the music. Any takers?