February 2008 Archives
I’ve been hearing how easy it is to develop filesystems with the Objective C interface for MacFUSE (Amit Singh’s OS X port of FUSE, the “Filesystem in USEr space”). I’ve been looking for a reason to learn ObjC for a while, so I figured I’d check it out. The result was TuneDrawer.
I’m not sure why I’m such a big fan of iTunes. I’ve heard plenty of people complain about how locked down and slow it is. I tend to shy away from proprietary systems (excepting OS X itself) and there’s no reason for the real-time “search” to be as slow as people say it is. But at this point, I think my reason for using iTunes is mostly the comfort of (now that I think about it) the only piece of software I’ve used continuously for the last 4 years. As a result, I frequently find myself starting projects that have to do with addressing iTunes shortcomings. It’s starting to feel like (though it’s certainly not true) I’m more familiar with the Applescript interface than whoever actually specced it.
This particular project is a filesystem view of all your tracks in iTunes. As of right now, when you run the program, it mounts TuneFS, which badly needs to be renamed, at /Volumes/tunefs. In the root, there are two folders: Artists and Playlists. The Artists folder contains folders for all current artists in your iTunes library, which, in turn, lead to their respective albums and tracks. The Playlists folder in TuneFS contains folders representing all your playlists and the corresponding songs.
The artists hierarchy can also be accomplished by selecting the “Keep iTunes Music Folder organized” preference in iTunes itself. The playlists folders could be used to share an entire playlist’s files with a friend, but you could also just select all the songs in iTunes and drag them to the Finder. However, I’m confident this is useful for something. The first thing that comes to mind is using the TuneFS mount point as a share (think web server or NFS). I’ve even got some other features in mind for future revisions.
This first version is being released as a public alpha, which will hopefully inspire me to continue working on it. The next release will consist of some heavy refactoring and fixing the plentiful memory leaks. Once those are done, I’ll put up the source code as well, in case anyone is interested.
You can download TuneDrawer at its project page.