0xDECAFBAD

It's all spinning wheels and self-doubt until the first pot of coffee.

Spotlight Bummers and the CC Metadata Importer

I was just snooping through the installer package for Nathan Yergler's CC Metadata Importer looking for some clues toward resolving my gripes noted in Blosxom, Tiger, and Spotlight. In doing so, I just realized that the guts of this importer are written in Python. That's really pretty nifty and I need to look into this some more.

However, more toward the gripes from that previous post, I'm assuming that this CC Metadata Importer will kick out any other importer dealing with MP3 files once it's installed. Let's see what happens... (runs off to install the importer)

In fact, after I installed the importer, I noticed metadata missing from my MP3s that had been there pre-install, such as:

  • kMDItemMediaTypes = (Sound)
  • kMDItemMusicalGenre = "Rock"
  • kMDItemTitle = "Sunday"
  • kMDItemTotalBitRate = 256
  • kMDItemAudioBitRate = 256
  • kMDItemAudioChannelCount = 2
  • kMDItemAudioSampleRate = 44100
  • kMDItemAuthors = ("David Bowie")

I looked into Audio.mdimporter under /System/Library/Spotlight and this is what I found in Contents/Info.plist:

And, what do you know? This is what I found in Contents/Info.plist for Creative Commons Metadata Importer.mdimporter:

This new importer wants to handle public.mp3, just like Apple's Audio.mdimporter. So, from my understanding, the CC importer will replace Apple's--rather than cooperating with it, as I'd like to see. (I wonder if there's any way to hack chaining into these things?)

When I run mdls on an MP3 I have lying around, this is what I get before installing the importer:

So, I installed the CC importer, let it re-index things, and this is what mdls gives me now:

In case those two floods of metadata set your head spinning, the post-install metadata is lacking items from the pre-install metadata. I need to uninstall this importer and get my other metadata back. And, this isn't a slight against the importer--it looks like really cool work. No, this is a bummer of Spotlight.

Almost there...

Archived Comments

  • At WWDC I heard some of the Apple developers complaining about this as well. It certainly is a huge shortcoming of spotlight and hopefully it will be addressed soon. Because of this, for example, it would be impossible to have an importer for * which imported the MD5 hash of every file on your system, or something like that.
  • My latest project, SpotMeta, solves this problem. The extension it installs also allows importers to be cascaded.