Send events to zeitgeist

Bug #579972 reported by Jendrik Seipp
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Decibel Audio Player
Fix Released
Undecided
Anonym25712
Zeitgeist Data-Sources
Invalid
Undecided
Unassigned

Bug Description

Hi,
great job on 1.04! I think it would be great if decibel would send events to the zeitgeist engine. Zeitgeist is an exciting new system and it will probably attract many users in the future.

I have already written and attached the plugin. It would be great if you could add it to the program.

Revision history for this message
Jendrik Seipp (jendrikseipp) wrote :
Revision history for this message
Jendrik Seipp (jendrikseipp) wrote :

I added the zeitgeist data-sources project to the bugreport. Could you guys please tell me if I have done everything correctly in the zeitgeist plugin?

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Here's a quick review of the plugin. I can't comment on the Decibel parts, just on the ZG integration parts:

 * You can set the subject origin to the parent folder of the URI. You can just use os.path.dirname(uri)
 * It's a good idea to figure out the mimetype for the subject. You can fx. use gio to do this. In gio lingo you must query the "content type" of the corresponding GFile. At least this is very handy for 3rd party apps querying ZG

In the Event instance:
 * You don't need to set the timestamp. If you leave it out ZG will set it to "now". But it's not that it's wrong what you are doing - I'm just saying :-)
 * And just a word of warning: In ZG 0.3.4 we'll change OPEN_EVENT to ACCESS_EVENT (and ACCESS_EVENT is not available in 0.3.3). Sorry for the inconvenience here

Otherwise good work as far as I can see! :-D

Revision history for this message
Jendrik Seipp (jendrikseipp) wrote :
Revision history for this message
Jendrik Seipp (jendrikseipp) wrote :

Thanks for the comment. I applied the changes. Some thoughts:

Is it better to use Interpretation.MUSIC or Iterpretation.AUDIO?

I found out that in python the batteries really are included ;) You can do:
import mimetypes
mimetype, encoding = mimetypes.guess_type(filename, strict=False)

Wouldn't it be good for a "audio track event" to save the album information with it? That way GAJ could later just display the albums I listened to and not every single track (which makes GAJ kind of crowded).

Revision history for this message
Anonym25712 (anonym25712) wrote :

Thanks for the patch, I just discovered what Zeigeist is :-) I'll try to play with it to make sure everything works correctly with this plugin.

Changed in decibel-audio-player:
assignee: nobody → François Ingelrest (athropos)
status: New → Confirmed
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Jendrik: Interpretation.AUDIO is future proof. MUSIC will be removed in ZG 0.3.4.

The actual metadata of the track (such as it's album) are better stored in an actual metadata repository - such as Tracker (which probably already knows this). Zeitgeist is mainly meant as a log to store the event and not full metadata for the actual subjects of these events (only the subset that we really really need).

Revision history for this message
Anonym25712 (anonym25712) wrote :
Changed in decibel-audio-player:
status: Confirmed → Fix Committed
Revision history for this message
Jendrik Seipp (jendrikseipp) wrote :

As Mikkel pointed out it would be better to use Interpretation.AUDIO instead of Interpretation.MUSIC

Thanks for including the module!

paraiko (paraiko)
Changed in decibel-audio-player:
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Revision history for this message
Anonym25712 (anonym25712) wrote :

See v1.05

Changed in decibel-audio-player:
status: Fix Committed → Fix Released
Revision history for this message
Michal Hruby (mhr3) wrote :

Marking as Invalid in Zeitgeist Data-Sources as this got upstream.

Changed in zeitgeist-dataproviders:
status: New → Invalid
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.