Update (2013-06-16): A while ago I signed up for iTunes Match, and I have found it to be a great solution for viewing my iTunes library on multiple PCs, whether they are on my home network or not (I have my entire library available on my MacBook at work as well as my PCs at home and my iPhone). The solution below should still work if you don’t want to sign up for iTunes Match, but I no longer use the solution below.
A few years ago I built a PC to function as a semi-dedicated file server. It’s running Windows 7, so it’s still a fully-functional PC, but it’s not my primary workstation. Among other things, I use it to store all of my music, photos, videos, and documents in a central location that is backed up regularly. My primary desktop, my HTPC, and my laptop can access all of these files over the network via a Windows Homegroup.
Until recently the only copy of iTunes I used was on the server PC to sync my iPod classic. On my primary desktop I preferred to use MediaMonkey for music playback because of its speed and excellent library organization features. The only downside was that my play counts and ratings in MediaMonkey didn’t sync with my iTunes library on the server. It was a limitation I’d been content to live with up to this point.
Now that I’ve switched to an iPhone 4s 64GB and ditched my iPod classic, I’ve decided that I want to step things up in the music library department by syncing my playcounts, ratings, etc. between my primary desktop and my server. After looking into a few options (iTunes plugins for MediaMonkey, syncing my iPhone with my primary desktop instead of my server, etc.) I settled on using iTunes instead of MediaMonkey.
iTunes stores the music library database—which contains playcounts, ratings, and several other bits of metadata—in a file within the Music/iTunes folder of the computer it is installed on. This is a problem because I want my primary desktop to use the same library database file as my server.
This means that I can’t just add all of my songs to the desktop’s iTunes library because then I’ll have two libraries with different playcounts, ratings, etc. I also can’t just tell iTunes to use the library database file on the server, because the database uses absolute file paths to find music. In other words, my primary desktop would be looking for songs in C:/Users/Josh/Music/ because that’s where they are located on the server, and that’s where the server’s iTunes library database file is pointing to. But in order to access them, my desktop would need to be looking in //Server/Users/Josh/Music/ over the network.
The key is to “trick” the primary desktop into thinking that the server music files and iTunes library are located in the primary desktop’s music location. To do this, I created a symbolic link on my primary desktop that “redirects” from the desktop’s Music folder to the server’s Music folder.
Note: This only works if both PCs are referencing the same path for the Music folder. If your music on the server is at C:/Users/Sally/Music/ but your music folder on the desktop is at C:/Users/Jim/Music/ then this won’t work. You’d need to duplicate the file path on the desktop to match the path on the server by creating a user account for Sally on the desktop and then making sure that iTunes looks there for it’s music library instead of in Jim’s user account.
You can create a symbolic link using the following steps:
- First make sure iTunes is installed on both computers.
- Delete the Music folder in the C:/Users/Username/ folder. For me that would be C:/Users/Josh/Music.
- Open a command prompt as an administrator by opening the menu and typing “cmd” into the search. Then right-click on the top result and select “Run as Administrator.”
- In the command prompt, type
mklink /D C:\Users\Username\Music \\SERVERNAME\Users\Username\Music(the direction of the slashes is important). For me that would be
mklink /D C:\\Users\Josh\Music \\SERVER\Users\Josh\Music.
- You should now see a Music folder on the primary desktop where the original Music folder that you deleted used to exist. This “tricks” the primary desktop into thinking that all of your music, and the iTunes Library file, are actually located at C:\Users\Username\Music when in fact they are located over the network at \\SERVERNAME\Users\Username\Music.
- The next time you open iTunes on the primary desktop, it will use the iTunes library and music files that exist on the server.
The only limitation I’ve found to this solution is that your playcounts, ratings, etc. won’t update if you have iTunes opened on more than one computer at a time. This isn’t an issue for me because I’m not sharing my library with anyone else (if I were, I’d use the built-in Home Sharing option so my playcounts and ratings don’t get mixed with anyone else’s) so there’s no reason I’d have iTunes open on more than one computer. It might be annoying if I forget to close iTunes on one computer and then open it on another, but so far I haven’t had that happen.