Re: Suggestion for file type detection approach



On Tue, 2004-01-13 at 14:50, Fabio Gomes wrote:
> 
> > We can alter some of the gnome-vfs modules to update the gnome-metadata
> > db during write options.  The file manager can have direct access to the
> > db add additional data to files.  All GNOME metadata would be synced to
> > the file-system.  An indexer is needed to watch a few directories that
> > are likely to change (Desktop, Documents, etc..) to catch changes made
> > by non-GNOME apps.  This same indexer will need to crawl the filesystem
> > intermittently to locate changes made by non-GNOME apps outside of the
> > watch directories.  The gnome-metadata db would be filesystem agnostic.
> 
> That would be cool. Assuming that medusa has incremental updates
> implemented in time. :)
> 
> There could be also an API allowing applications to set the MIME type
> inside Medusa, so they could use this when saving files, and Nautilus
> could allow users change the MIME type of particular files (eg. bad
> sniffing results). 

I hadn't considered that scenario.  I only wonder what should happen
when gnome-mime-data is fixed.  A stale mime-type could cause problems.

All manager class apps should have access to gnome-metadata.  Music
managers need to set ID3, browsers set bookmarks.

I have a brief plan and a picture:
http://members.cox.net/sinzui/blog/2004/Jan/11.html


> I imagine that this would be fun stuff:
> 
> When reading a directory (assuming FORCE_FAST_MIME_TYPE is disabled),
> gnome-vfs could scan it and then query Medusa to get mime types. If
> there are any files that are still unknown to Medusa, gnomme-vfs would
> sniff the MIME type and insert into that database automatically. Hmm. 

Both Nautilus and Medusa use gnome-mime-data.  There's no point in
looking up the type again.

> Dead sexy. Would this be possible?
-- 
__C U R T I S  C.  H O V E Y____________________
sinzui cox net
Guilty of stealing everything I am.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]