![]() |
Mulle kybernetiKpresents |
![]() |
| iTunesFS | by ZNeK |
A friend of mine wanted to copy some files from an iTunes™ playlist to an external drive, but iTunes™ wouldn't allow her to simply let these files being dragged to the intended destination folder in Finder™. She asked me what she could do about it.
I thought about it for a minute, knowing that it wouldn't work with iTunes™ alone - but I realized that it's probably simple to code a solution. Even better than having a separate standalone application for it, I figured I could write a new FUSE file system - making use of the excellent MacFUSE project!
Enter iTunesFS, a FUSEObjC based file system for your Mac, which makes all your iTunes™ playlists available as folders in Finder™! And - not only that - as you can see in the screenshot below, version 1.1 adds support for iPod™s in the very same manner!
Now you can easily copy content of your iTunes™ library and your iPod™s in Finder™ or the Terminal - ideal for, err, backing up specific content. Whatever.
As noted by Peter da Silva, the above statement isn't really true for current (7.x) iTunes versions. In fact, these versions allow you to drag files from playlists to mounted filesystems, effectively making them copyable via drag and drop. However, this still isn't true for mounted iPods within iTunes. Also, the playlist ordering won't be preserved by doing so, thus using iTunesFS still has quite a lot of advantages.
Also new in this release is the existence of a new Compilations group, thanks to code contributed by Mark Wallis.
Version 1.1.4 saw the light of day at 2007-07-03. This version sports formatters which enable you to customize the formatting of track names displayed in Albums and Playlists in a very generic way. If you don't like the playlist index as a prefix you can easily redefine the formatter to not include it, and so on. Version 1.1.3 was released 2007-06-14. This version introduces "categories", which means that from now on you can browse by Artists and Albums in addition to the playlists. The file system hierarchy will be expanded, accordingly and has been localized for this purpose in German, French, Italian, Spanish and Japanese. If you don't need this feature, which is enabled by default, you can turn it off using a default.One more thing! ;-) This version has also been ported to GNUstep - this means that from now on you can write FUSE based file systems in Objective-C on any platform which is supported by GNUstep!
Version 1.1.2 was released 2007-05-31. It fixes a bug that prevented tracks from being accessible which had a question mark ("?") somewhere in their path name. Also, file metadata is now computed from the libraries' contents. Libraries having just one playlist (i.e. Shuffle devices) do omit this playlist and instead display all tracks at once. Last but not least, added the ability of returning symbolic links instead of "faking" the presence of files. People using iTunesFS in association with shell scripts might prefer that option. Version 1.1.1 was released 2007-05-29. It fixes a bug that prevented iPods from unmounting. Also, iTunesFS can be told not to scan for iPods at all. In case no iPod is found, the file system hierarchy will be missing the libraries entry, which is much more convenient in these cases I guess. Version 1.1.0 was released 2007-05-24. It adds the not-so-long anticipated support for iPod™s! Version 1.0.4 was released 2007-05-23. It currently supports a single iTunes™ library only, but there will be support for iPods in the near future I guess! ;-)IMPORTANT! Before you can start using iTunesFS, you need to install the appropriate MacFUSE Core package!
| Date | Version | MacOS X | File | Required MacFUSE Core version |
|---|---|---|---|---|
| 2007-12-31 | 1.1.6 | 10.4 + 10.5 (PowerPC and Intel) | iTunesFS-1.1.6.dmg |
MacFUSE-Core-10.4-1.1.0.dmg (MacOS X 10.4)
OR MacFUSE-Core-10.5-1.1.1.dmg (MacOS X 10.5) |
Also, the whole sourcecode is available from Mulle kybernetiK's Subversion Repository.
svn co http://svn.mulle-kybernetik.com/iTunesFS/trunk iTunesFS
See license for details. Modifications and suggestions welcome!
First of all - please note that it's normal for iTunesFS not to bounce in your dock! This is intended behaviour, as iTunesFS is not really an ordinary Desktop application with a menu, but rather a file system (you can tell that by looking at the screenshot in case you still have doubts).
If you don't see the iTunesFS Volume appear in Finder shortly after you started the application, something unexpected has happened…
Popular reasons that cause iTunesFS to fail are:
iTunesFS expects the iTunes Music Library.xml file to be in the standard default place, that is ~/Music/iTunes/iTunes Music Library.xml (where ~ designates your home directory). If you happen to have changed that location, all is not lost - fancy iTunesFS sports a nifty user default just for that case! ;-) Open Terminal.app and type the following:
defaults write com.mulle-kybernetik.znek.iTunesFS Library COMPLETE_QUALIFIED_PATH_TO_YOUR_ITUNES_XML_FILE
Make sure to apply proper quoting/escaping in a shell!
You need MacFUSE Core from the link above! Using a Fink package won't work (out of the box).
(since version 1.1.1): If you don't want iTunesFS to look for iPods at all, type the following in a Terminal:
defaults write com.mulle-kybernetik.znek.iTunesFS NoIPods YES
(since version 1.1.2): create symbolic links rather than fake files:
defaults write com.mulle-kybernetik.znek.iTunesFS SymbolicLinks YES
(since version 1.1.3): browse using categories ("Albums", "Artists", "Playlists"):
defaults write com.mulle-kybernetik.znek.iTunesFS UseCategories YES
(since version 1.1.4): format the displayed track names in a generic way:
defaults write com.mulle-kybernetik.znek.iTunesFS AlbumsTrackFormat "'%(trackNumber#00) %(name).%(ext)'"
defaults write com.mulle-kybernetik.znek.iTunesFS PlaylistsTrackFormat "'%(playlistNumber#000) %(name).%(ext)'"
Several things to note here:
defaults write com.mulle-kybernetik.znek.iTunesFS PlaylistsTrackFormat "'#%(trackNumber#00) %(name) (%(artist) - %(album)).%(ext)'"
This will produce output similar to this:(since version 1.1.5): watch for iPods at the following mount points:
defaults write com.mulle-kybernetik.znek.iTunesFS iPodMountPoints -array /Volumes/iPodTouch
Replace /Volumes/iPodTouch with the real path to your iPod's mount point. Note that you can provide multiple values (in case you have an iPod Touch AND an iPhone ;-).
(since version 1.1.6): If you don't want iTunesFS to show your iTunes library, type the following in a Terminal:
defaults write com.mulle-kybernetik.znek.iTunesFS NoITunes YES
Q: Write support?
A: Forget it. Writing isn't trivial. At least
iTunes™ will want to write to the same database files concurrently,
thus we'd need a way to tell iTunes™ to stop - and even to
re-synchronize afterwards we have written our changes. Even if we could do that,
how would we reorder entries in a playlist? By renaming the prefixing
index manually? This is totally unusable in my opinion.
iTunes™ is really great at managing the contents of your library
and your iPod™s. The only thing that it doesn't allow you to do
(probably by intention) is to easily copy content off your library or
your iPods to a location YOU desire. iTunesFS
fixes that "problem", nothing more and nothing less.
Q: Make iTunesFS work with the Fink package?
A: Create a damn symlink instead. iTunesFS
links against
/usr/local/lib/libfuse.0.dylib, so make
sure it finds the version installed by Fink there - if you really must
use the Fink version.
Copyright (c) 2007, Marcus Müller <znek@mulle-kybernetik.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Mulle kybernetiK nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.