Automatically determine interpretation from mime-type when it's empty

Bug #899602 reported by Siegfried Gevatter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zeitgeist Framework
Fix Released
Undecided
Siegfried Gevatter

Bug Description

Several of our client APIs (python-zeitgeist and libzeitgeist) currently support guessing the subject interpretation from the mime-type.

I think it'd make sense to move this directly into the engine. So, if a subject is inserted with an empty interpretation (which seems to be allowed currently), we'll try to determine it from the mime-type.

This will avoid duplicating the mime-type mappings in different bindings. It'll be even more useful for clients using the D-Bus API directly (such as GTK+).

Related branches

Changed in zeitgeist:
milestone: none → 0.9.1
assignee: nobody → Siegfried Gevatter (rainct)
Revision history for this message
Seif Lotfy (seif) wrote :

I had an extension for kde users that depended on kio to get the interpretation of an based on the mimetype.
My questions before this is hacked:
1) Is there a way to do it cross platform so we dont need to depend on any GNOME or KDE libraries to do so
2) Should we do it as an extension that hooks into "Pre Insert Event" or hard code it into the engine.

Revision history for this message
Siegfried Gevatter (rainct) wrote : Re: [Bug 899602] Re: Automatically determine interpretation from mime-type when it's empty

This is nothing new, just the existing code from Python/libzeitgeist.

2011/12/16 Seif Lotfy <email address hidden>:
> 1) Is there a way to do it cross platform so we dont need to depend on any GNOME or KDE libraries to do so
Sure, we're just looking up the "subject mime-type" field in a
mimetype->interpretation dictionary.

> 2) Should we do it as an extension that hooks into "Pre Insert Event" or hard code it into the engine.
Don't see why we would overcomplicate it with an extension. Either we
do it, or we don't, but we don't "maybe" guess mime-type, that's just
confusing API users who want to rely on the feature.

Revision history for this message
Seif Lotfy (seif) wrote :

Sorry I thought the other way round where we get a file without a mimetype
then guess the mimetype

On Fri, Dec 16, 2011 at 8:19 AM, Siegfried Gevatter <email address hidden>wrote:

> This is nothing new, just the existing code from Python/libzeitgeist.
>
> 2011/12/16 Seif Lotfy <email address hidden>:
> > 1) Is there a way to do it cross platform so we dont need to depend on
> any GNOME or KDE libraries to do so
> Sure, we're just looking up the "subject mime-type" field in a
> mimetype->interpretation dictionary.
>
> > 2) Should we do it as an extension that hooks into "Pre Insert Event" or
> hard code it into the engine.
> Don't see why we would overcomplicate it with an extension. Either we
> do it, or we don't, but we don't "maybe" guess mime-type, that's just
> confusing API users who want to rely on the feature.
>
> --
> You received this bug notification because you are subscribed to The
> Zeitgeist Project.
> https://bugs.launchpad.net/bugs/899602
>
> Title:
> Automatically determine interpretation from mime-type when it's empty
>
> Status in Zeitgeist Framework:
> New
>
> Bug description:
> Several of our client APIs (python-zeitgeist and libzeitgeist)
> currently support guessing the subject interpretation from the mime-
> type.
>
> I think it'd make sense to move this directly into the engine. So, if
> a subject is inserted with an empty interpretation (which seems to be
> allowed currently), we'll try to determine it from the mime-type.
>
> This will avoid duplicating the mime-type mappings in different
> bindings. It'll be even more useful for clients using the D-Bus API
> directly (such as GTK+).
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zeitgeist/+bug/899602/+subscriptions
>

Changed in zeitgeist:
status: New → In Progress
Changed in zeitgeist:
milestone: 0.9.1 → 0.9.0
Changed in zeitgeist:
status: In Progress → Fix Committed
Seif Lotfy (seif)
Changed in zeitgeist:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.