I recently switched back to a laptop from a desktop, and at just about the same time, ended up with a 60gb iPod. as it turns out, the music that I keep in iTunes all fits on the iPod. Thus, it didn’t make much sense to me to carry around a laptop with half of its space devoted to music that is also on a portable music device that I’m also carrying around. This is my solution. (Thanks to the folks over at the mac achaia, where i posted this question and got some ideas).

My needs were simple:

I decided to keep my music library on an external firewire drive. As I have been keeping a backup of my music library there (along with stuff that I removed from keeping track of in iTunes a long time ago when everything was on a smaller laptop a few computers ago), it seemed like a good place to start.

First, I made sure that everything that was in my ~/Music/iTunes/iTunes Music Library folder was actually registered in iTunes (not required, just housekeeping). Here’s a little shell script to do just that. It uses FileMerge, so be sure to have the developer tools installed.

I then told iTunes that its library was really my backup copy on the external drive. This fixed its references for things that I had moved out of the way in my last desktop->laptop migration, and for everything else, it still thought they existed on the internal drive. I then told iTunes to consolidate its library. This (unfortunately) copied everything from my internal drive to the external one, duplicating everything that already existed on the backup drive. No worries, as the duplicate filenames are very predictable, I was able to make a script to fix that as well. Then, I toggled the “Keep Library Organized” checkbox in iTunes and it renamed everything and stripped off the superfluous  1 that it had added.

Now, for mobile operations, I’m (ab)using the fact that iTunes will silently flip its library location to be on the local drive if the external drive is not attached. This means that all of the files will be marked as not found, but not a problem, as they exist on my iPod. Thus, I can rip CD’s or otherwise add music to the library while on the road, and still get that to sync with the iPod (I’ll just get a warning about not being able to find some files to copy, but it won’t remove things from the iPod). Then, when coming back home, just plug in the external drive, and Consolidate Library from the menu, and everything will be whisked onto the external drive.

Hope this is useful to someone else out there with a similar predicament :)

Tags:

Comments are closed.