GNOME Bugzilla – Bug 645523
Full resolution and tracker plugin
Last modified: 2011-03-28 16:19:01 UTC
When using the tracker plugin which now provides metadata and media sources, if you call grl_metadata_source_resolve() or grl_media_source_metadata() function with the full resolution flag, the tracker plugin is going to be called twice and generates twice the same Sparql request under certain circumstances. Let's say you want metadata for title and album and artist keys for an item and tracker is only able to provide the title key for that given item. Because you asked for full resolution, others metadata sources will be involved in resolving the other keys, including the tracker metadata source which won't give more results than what the tracker media source has been able to deliver. So the tracker plugin ends up doing twice the same request for no more result. I understand this is a corner case, but it would be nice to be able to describe such a relation between 2 sources so we don't spend resources doing the same requests several times.
Apparently the database has been restored a few hours/days back. Juan, can you repost your fix ? I might have seen an issue.
Created attachment 184477 [details] [review] Patch to fix the problem Re-submitting again the patch, as it was lost during a bgo machine failure
Fixed as commit 5aec4f22278ee32933a8e1faf2db2337e5fed2ca Author: Juan A. Suarez Romero <jasuarez@igalia.com> Date: Thu Mar 24 09:17:49 2011 +0000 tracker: metadata should not resolve media coming from tracker This is mainly an optimization: we do not want tracker resolving keys for medias coming from tracker. The rationale is that we have metadata() precisily to do it: invoking resolve() after invoking metadata() for Tracker media is useless, as if the key could not be resolved with metadata() it will not be resolved with resolve() (both functions are sharing the same code). This fixes https://bugzilla.gnome.org/show_bug.cgi?id=645523 Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> src/media/tracker/grl-tracker-media.c | 31 ++++++++++++++++++++++++++++++ src/media/tracker/grl-tracker-media.h | 2 + src/media/tracker/grl-tracker-metadata.c | 4 +++ 3 files changed, 37 insertions(+), 0 deletions(-)