Migrate Windows iTunes to Mac with Music Stored on SMB Share

How to migrate iTunes from one platform to another and retain links to your songs, even when they are stored remote to the iTunes client, and their path has changed.

Before
Windows laptop with iTunes 8.x. All (most) music is stored on a Samba server mounted at M:\media\mp3, rather than where iTunes wants you to put it. In Linux it's called freedom, in Mac OS it's called swimming against the stream.

After
Mac laptop with iTunes 8.x and All (most) music is stored on a Samba server mounted at /Volumes/media/mp3

iTunes stores its library in a binary database with an .ITL extension. It also exports from that an .XML file which contains a lot of the metadata from this database, but not all.

On the Mac
Assuming this is a new Mac with nothing useful in iTunes yet

  1. Quit iTunes
  2. Remove the ~/Music/iTunes directory

On the PC
In my case the PC is a extracted hard drive plugged into the USB port.

  1. Copy the ~/My Music/iTunes directory to ~/Music on the Mac.
  2. Copy the ~/Music/iTunes/iTunes*.xml file to ~/Desktop/backup.xml
  3. If you look in the XML file you'll see filenames that look like file://localhost/M:/media/mp3. Use sed to convert those M:/media to /Volumes.

Open iTunes

  1. Start iTunes up
  2. Import a playlist, (File -> Library -> Import Playlist), select the cleaned up XML file you just modified.

Clean up duplicates
You now have 2 copies of each track from the samba server. Use Duplin to fix that..

  1. Install Duplin
  2. Run Duplin and tell it to keep dupes found on /Volumes/media, see the docs.

The free version only works with duplicates in groups of 40 at a time, which is painful if you have thousands of tracks. So, buy the full version. This Mac world is so different...

Retaining playlists through this seems to be a bit of a pain, but it's "possible". I'd just dump them.

Be sure to watch the video howtos on the Duplin site for tips.

p.s. I hate iTunes.

Tags:

Syndicate

Subscribe to Syndicate