Sunday, 27 June 2010

GSoC: Zeitgeist weekly report #5

Hey there!

Another report here with a look-back at what I did this week and what is planned for the next week, so here we go:
  • I started to write a Totem plugin which allows searching for recent media logged in Zeitgeist, so far it's very similar to the Youtube plugin (probably because I borrowed the UI from there), but it indeed does search Zeitgeist. There were a few pecularities with the plugin, so I'll rant here a bit about the documentation - if TotemVideoList requires a reference to TotemObject, it'd be nice to mention this in the documentation - it's far from obvious that one needs to call g_object_set (video_list, "totem", totem_obj, NULL) for it to not crash when one clicks on an item in the widget. Then there were some other crashes when I didn't set "tooltip-column" property, but ok, that one wasn't that hard to figure out.
    The plugin was pushed to zeitgeist-dataproviders[1], but as Seif said, it's not a dataprovider, so he removed it from there, and so far I do not know where we'll push these non-logging plugins. Anyway it's there but you have to revert to revision 78.
  • I helped Seif with Sezen, cause I got quite different data and it was loading very slowly for me - so I tried to use everywhere async gio calls, and after some tweaking it was working much better. Btw. Siegfried just pushed Sezen to Zeitgeist PPA [2], so feel free to check it out.
  • I was still quite unhappy with the responsiveness of Sezen, so I ported it to Vala [3], but to my surprise the thumbnail fetching in the Vala version is *much* slower than in the python version and I don't really know why. In both python and Vala, I'm trying to load all the thumbnails at once, and while in python this works fine, I was getting "too many open files" error in Vala, so I introduced an async method which limits how many thumbnails can be being fetched at one time (while the others are waiting) and that seems to work quite well, but I still have a feeling that the python version is faster.
For next week the plan is to implement also "related media" into the new Totem plugin, take a look on the vim logger, which I noticed is sitting on LP without being "official" part of zeitgeist-dataproviders. And talk to Seif what to do about Sezen / Sezen-vala.


Saturday, 19 June 2010

GSoC: Zeitgeist weekly report #4

Hey everyone, this week the report will be very short, cause as I mentioned in last week's report I was (and still am) travelling, and in the little spare time I had, the internet connection was very flaky, so unfortunatelly I wasn't able to do much.

I updated the existing plugins to work with libzg 0.2 (as there were some API breaks) and I started to write a totem plugin which will show media grabbed from Zeitgeist, but in the process I encountered a very strange bug in (by that time latest) libzeitgeist, where the timestamps were truncated to 32 bits even though everything was correctly declared as gint64. This of course caused that no results were fetched from Zeitgeist - as the timestamp limited the results till the end of 1970s, and of course I don't have any such events in my DB. Anyway I wrote Mikkel about this bug with a gdb trace and he was able to hunt it down and fix it (fixed in libzg 0.2.1).

For next week I plan to finish the totem plugin and as planned for this week, I'll stop by in #rhythmbox and try to polish and fix the strange bugs in our new Rhythmbox plugin.

Friday, 11 June 2010

GSoC: Zeitgeist weekly report #3


I'll be also a bit early this week, as I'll be traveling starting tomorrow, so here we go:

This week I finished moving the build system in zeitgeist-dataproviders[1] to autotools, and even though it's not perfect yet (can't install properly firefox and chrome extensions, mostly because I don't know where to put them in the filesystem for it to just work), it's good enough to build all dataproviders. Also if anyone wants to make a package of the dataproviders, please contact me, I think it's time to do it.

Further I had planned to write a totem extension, which would add some Zeitgeist goodness into it, but in the end this was postponed and instead I wrote a Rhythmbox plugin that adds a few smart playlists to Rhythmbox. This effort was slightly hindered by incomplete Rhythmbox bindings for Vala, but I decided to fix this and auto-generated the Vala bindings for pretty much the entire Rhythmbox, which really wasn't as easy as I expected, but it's now available on bugzilla[2].
Unfortunately I'm seeing some issues with the plugin - for example first time it's loaded it doesn't show anything, even though I am getting the data from Zeitgeist and calling RB's method to add them. I'll have to ask someone who knows the internals of RB why is that...

Also today Mikkel pushed some changes to libzeitgeist[3], so while looking at it, I discovered a little patch which was forgotten in my tree, and besides that I was trying to push some Vala goodness for the new API (foreach support), but I wasn't successful at convincing Mikkel that he needs to change the API a bit... yet :)

So that's about it, for the next week I don't plan much, as I'll be still traveling, but I hope to find some time to polish the new RB plugin, and if I find more time I'll take a stab at the Totem plugin.



Saturday, 5 June 2010

GSoC: Zeitgeist weekly report #2


As planned, this week I finished our new Chrome extension together with the NPAPI plugin. In the end the javascript part of the extension didn't turn out to be as straightforward as I expected, but using some not-so-nice hacks  it does what it's supposed to do. After I finished the Chrome extension I tried to make our new totem plugin using libzeitgeist build out of totem's tree, and fortunately this was easier than I thought it would, so it's done now and I also got some time to start to revamp the build system in zeitgeist-dataproviders [1], and even though now it's a strange mix of autotools in the top source directory and our own Makefiles in the plugin dirs, it works and currently provides the ability to detect which plugins can be build and it builds only those (note that it's incomplete, but the framework is there).

Plan for the next week is to move the whole build system to autotools, with the ultimate goal of making it possible to build packages of the dataproviders. Once that is done, I'll start to write another totem plugin, this time one which will pull data from ZG and therefore will add some UI elements to totem. Stay tuned ;)

Note to self: maybe I'm too spoiled by python, but this just doesn't work in JS (at least not when writing Chrome extension), even though there's no warning/error:
if (condition) {
    function callback () {
        console.log("You'll never see this");
    document.addEventListener("event", callback, false);