Sharing Music with iTunes and mt-daapd

In honor of today’s launch of iTunes 7…

I’ve been floating this idea for while, and I thought I’d sketch it out here on the off-chance that someone might run with it.

I think it’s safe to say that iTunes is a fairly ubiquitous application. Versions exist for both Mac and Windows operating systems. It’s free to download, and all things considered, it’s a very nice piece of software. I can also fire up iTunes at any time during the day at work and I’ll almost always see several other users’ shared libraries on our wireless network. I’ve even had people listen to my shared library. This begs the question, why aren’t we sharing an iTunes library at our, um, library?

The problem is that we could definitely create an iTunes share on a computer somewhere, but we would soon run in to disk-space issues and other complications such as always having to be logged in with iTunes running in order for the service to be active. Well, I’ve been using a very cool piece of open-source software for a while that solves this. It’s called mt-dappd. It’s basically an iTunes server that runs as a daemon in Linux. It has a number of nice features, including playlist support. It would be quite easy to set up a new server with a terabyte or two of storage, and have your technical services department start importing new CDs as they come in (tech-serv. people are going to kill me, I know). Of course, they don’t have to import every CD they get, maybe the more popular ones–that’s up to your library.

Once your tech services folks are done importing a batch of CDs, they could be given an rsync script that syncs the new material to the dappd server. I’ve experimented with this a bit and use the following command to do it for my iTunes library:

rsync -zrptL --delete-after --progress -e "ssh" --include=core --include=tags --exclude=.DS_Store --cvs-exclude "/Users/TechSrv/Music/iTunes/iTunes Music/" root@dappd.mylibrary.org:/path/to/itunes/volume/

If you’ve set the rescan_interval option in your mt-daapd.conf file, the running mt-daapd daemon will automatically re-scan the file system for changes. The result is that you’ve got a system for sharing music that requires little or no intervention after the initial setup. Because mt-dappd allows you to specify multiple locations for music files, you could simply change your rsync script to point to another directory once the tech services computer fills up with music.

This seems to me to be an easy way to provide low-barrier access to content on your existing guest and wifi networks. It also doesn’t require the material to be on the premises. In addition, If your library produces podcasts, the playlist feature would be a great way to showcase those.

I’d love to hear if anyone does something like this.


About this entry