toxicsoftware.com

RANDOMIZE USR 0

toxicsoftware.com header image 2

Here’s your Media Browser right here

September 23rd, 2005 · Comments · Default

Both Dan Wood and Mike Zornek are missing the point when they claim that Apple needs to provide a publicly accessible API for browsing iApp (iTunes, iPhoto, etc) media files. Apple already provides us with such an API: Spotlight.

Creating a media browser window that interfaces with Spotlight is probably an afternoon’s work (in Cocoa of course). However the browser would be superior to the one Apple uses in its iApps. It would be able to browse for any media on the user’s machines, not just the media provided by the iApps.

Perhaps the real problem (and the bug that Dan should post instead of the one he did) is that Apple is limiting their browser to the iApps media instead of using Spotlight.


Update: Of course - this solution would require 10.4.


Update: Spurred on by this post’s comments I’m putting my money (or rather time) where my mouth is and coding it. When finished I’ll release it under the BSD license for anyone to use. If anyone wants to lend a hand that might be quite nice. Current screenshot: MediaBrowser001.png

Tags:

Viewing 12 Comments

    • ^
    • v
    I agree that spotlight is the ideal underlying technology ... but spotlight doesn't organize my iPhoto library, iTunes library, etc. It's an indexing technology, not a user interface component. What I an talking about is a standard user interface component. Sure, I could parse the XML lists from iTunes, or do a spotlight query to get all the images, but I still would have to deal with optimal thumbnail viewing code, organizing the data into source lists for use by a popup, etc. Yes, I *could* do it ... but since Apple has already done the work, it makes sense for them to provide it.
    • ^
    • v
    The problem with the Spotlight approach is that if I've already organized my iPhoto library, and want a picture from an album, how is Spotlight going to help me find it? AFAICT, that type of information isn't indexed (but probably should be.)
    • ^
    • v
    But the trouble with Apple's browser is that it _only_ works with media in iPhoto, iTunes, etc. If someone came along and wrote a better iPhoto or iTunes (it could happen!). Then Apple's browser would not pick media stored by the new applications.

    The real problem is that Apple's browser only browses its own (semi) private data

    Writing the browser itself is relatively trivial. Spotlight is a really simple API and providing a UI to it via Cocoa bindings wouldn't take too long at all - even with thumbnailing and other media previewing.
    • ^
    • v
    Well in a perfect world the iApp media would have spotlight metadata attached to show what folder it had been organised into, what film the photo was imported with and so on. AFAIK that isn't present.

    I think limiting a media browser to media that has been organised only by Apple's iApps is self limiting. I think it would be best to ignore the Apple Media browser (lets face it, the chances of Apple providing an API is pretty low) and create your own (feel free to release it as an Open Source component).
    • ^
    • v
    I think you're expecting too much from what is essentially a glorified "file picker." It shouldn't be a global disk searcher. Not only would that be slow, it would include too much junk. I certainly wouldn't want to have to choose from among all the supporting JPEG and TIFF images included in application bundles.

    I think Dan's suggestion is good, especially when taken to the logical extreme of incorporating it into the standard file picker. Then you would have a file picker that is capable of:

    1. Browsing particular subsets of the disk.
    2. Browsing well-known collections (such as "iTunes Music).
    3. Searching within any focused collection.
    4. Displaying selectable items in a context-sensitive presentation, e.g. as a list of songs, or as a matrix of thumbnails.

    The Windows standard file picker, at least, has a built-in thumbnail tiling view.

    I also think you overstate by quite a bit the ease of throwing something like this together. If you can do it in an afternoon, then *please* do so and share it with the rest of us. This is the kind of thing that has a lot of tiny facets, each of which has to work perfectly in order to be a satisfactory generalized solution. Just getting the selectable, resizeable, tiling matrix bug free would probably take a fair bit of work, unless you have one lying around.
    • ^
    • v
    Daniel:

    True. I probably understated the difficulty of it a bit. I already have a code to do a lot of what it would do (displaying thumbnails from spotlight) so it might be a bit easier for me.

    But not solving the problem yourself because Apple already has a widget that they're sharing between there apps in the hopes they'll share it with 3rd parties isn't going to help much. I'd love Apple to prove me wrong and provide a hook for it - but hell they don't even provide APIs to create all the different buttons they have in the iApps.

    I never considered that this would be a "global disk browser" (heck we have the Open dialog for that - and it has spotlight built-in). I believe something that works almost identically to Apple's browser but works with every application's media (instead of just the iApps) is easily accomplished.

    For extra points you could use iTunes/iPhotos XML files - at least until Apple provides (if they ever do) spotlight metadata for this information.

    And I dont believe every developer should write their own. Something like this should definitely be OpenSource and shared between developers.
    • ^
    • v
    I totally agree that every developer shouldn't write their own. Whether Apple or a 3rd party comes up with something even half as useful as what's been discussed here, it will be a big win!
    • ^
    • v
    Working on it. See updated post.
    • ^
    • v
    Awesome!
    • ^
    • v
    This would be great! A couple of resources ... I'm hoping that John Fox will contact you; he's been working on something. There's also something in Mr. Wil "No Unit Testing" Shipley's blog at the bottom of this entry: http://wilshipley.com/blog/2005/09/jpeg2000-coo... that suggest that CGImageSourceCreateThumbnailAtIndex() is a function you may want to check out...
    • ^
    • v
    Is there anyway to export the spotlight results to apache? using xmlhttprequest the results from spotlight could be put on the web.
    • ^
    • v
    Phil:

    See my posting here: /index.php/weblog/mod_spotlight_apple/

    I've also worked on a hack for safari that allowed you to search spotlight natively in safari using a URL scheme of "x-spotlight".
 
close Reblog this comment
blog comments powered by Disqus