10/26/11

Inside Apple iTunes, Sharing music on your home network


I've been trying (and still am) to figure out the best way to manage and share a large library of .mp3 files, I never cared much for iTunes but considering I have iPhone/iPads I thought I should at least look into it.

The sharing features of iTunes leave much to be desired but I am going to attempt to configure it so that I have an iTunes server with a library that can be shared throughout my network.

What I decided to do was to install iTunes on a virtual machine running in my VMWare ESXi environment, this way I could add iTunes into the startup folder and it would always be open and available. One of the things I don't like about iTunes is that to share a library iTunes has to be open and if you setup sharing and want to add or edit music or playlists, you have to do it from one computer.

So I wanted to come up with a way where any one of the computers could add or edit music or playlists and it would propagate to all the other iTunes computers in the house.

First on the iTunes server I pointed the media folder to my network share that contains all of my .mp3 files, I also checked the copy files to iTunes Media folder when adding to library checkbox. This way any new music added to the library will be copied into a central location.


Import Music

To import my music I selected File - Add Folder and proceeded to browse to my mapped drive where all my .mp3 files are located. Note this can be a very slow process if you have several GB of music.


Once all the music has been added to the library, I'm ready to look at how iTunes keeps track of the library and what files are important to know about.

iTunes Library Files - Library.itl and Library.xml


The iTunes library is a database iTunes uses to organize your music. Two iTunes library files are created and maintained by iTunes for different purposes. They're both in the iTunes folder.

Location of the iTunes library files:


Mac OS X:
/Users/username/Music/iTunes/iTunes Library.itl
/Users/username/Music/iTunes/iTunes Library.xml


Windows XP
\Documents and Settings\username\My Documents\My Music\iTunes\iTunes Library.itl 
\Documents and Settings\username\My Documents\My Music\iTunes\iTunes Library.xml


Windows Vista
\Users\username\Music\iTunes\iTunes Library.itl 
\Users\username\Music\iTunes\iTunes Library.xml


Windows 7
\Users\username\My Music\iTunes\iTunes Library.itl
\Users\username\My Music\iTunes\iTunes Library.xml



About the iTunes Library.itl file
This file is a database of the songs in your library and the playlists you've created. Some song-specific data is saved in this file. If you delete the file, iTunes creates a new, empty copy when you open the application, but any playlists, song ratings, comments, or other information you created is lost. The iTunes Library file is only used by iTunes, and is the only one backed up by Time Machine on OS X.



About the iTunes Library.xml file
This file contains some (but not all) of the same information stored in the iTunes Library file. The purpose of the iTunes Library.xml file is to make your music and playlists available to other applications on your computer. In Mac OS X other iLife applications (like iPhoto, iDVD, and iMovie) use this file to make it easier for you to add music from your iTunes library to your projects.




The point of this tutorial is to let several computers share the same iTunes library so after all of my music has been successfully added to my iTunes server I need to share the library files on the server. On the iTunes server, I navigated to the folder containing the iTunes library metadata. By default (see locations above) you can typically find this in \Users\username\My Music\iTunes. I see a file called iTunes Library.itl so I know I'm in the right location. I need to share this folder on the network, so I right-click the iTunes folder, select Sharing and security and select Share. Now I add the users that I would like to give share access and select the share button.



Grant permissions to all user accounts that will need access to the iTunes library



Next I connected all of my networked computers to the iTunes share, I mapped a drive on each. To do this, access a networked Windows computer, right-click on My Computer, and select "Map network drive" Choose a drive letter, then I browse to the share I created on the iTunes server. When I'm done, I click Finish. 






Now on all of my networked computers, I launch iTunes while holding the Shift key. This let me change the default iTunes library. I Clicked on Choose library, then navigated to the mapped drive (W:) that I just created. Select the iTunes Library.itl file and I'm done.


This completes the shared iTunes library, I'll continue to test how this works and if I find any improvements I'll update the post.


No comments:

Post a Comment