Hi, fin attached a new version of the patch. This one uses TrackerDBResultSet (guess this is what you meant by new db interface) and works fine with current trunk head. Iago El jue, 24-04-2008 a las 00:39 -0400, Jamie McCracken escribiÃ:
Patch is mostly ok but needs to be updated to use new db interface in order to work properly jamie On Wed, 2008-04-23 at 17:46 +0200, itoral igalia com wrote:Hi, thanks for the patch! I checked it out and found this: the patch made trackerd segfault. tracker_db_get_unique_metadata_values converted offset and limit parameters to string, but did not do the same for the id parameter, making it fail later when calling sqlite3_bind_text. Also, I think it passed the variable parameter list to tracker_exec_proc in a wrong way, for it seemed to be passing the parameter count (3) as the first parameter. I've fixed the first problem by using tracker_uint_to_str() and the second by removing that parameter and adding a trailing NULL parameter instead. I've attached the new version of the patch. Unfortunately, after fixing this, I found that the query does not seem to return any results, I always get am empty array as return value... :( I wonder if this might be related to this other bug I filed today, though at least in that case the query did work for some keys: http://bugzilla.gnome.org/show_bug.cgi?id=529516 IagoHello, The attached patch adds "GetUniqueValues" which should be what are looking for. Mikael ________________________________________ From: tracker-list-bounces gnome org [tracker-list-bounces gnome org] On Behalf Of Iago Toral Quiroga [itoral igalia com] Sent: Wednesday, April 23, 2008 11:15 AM To: tracker-list gnome org Subject: [Tracker] Querying values of metadata keys Hi all, I'd like to know how I can get the list of different values available for a given metadata key. For example, I'd like to get the list of different music albums (Audio:Album metadata key). Thanks in advance! Iago _______________________________________________ tracker-list mailing list tracker-list gnome org http://mail.gnome.org/mailman/listinfo/tracker-list_______________________________________________ tracker-list mailing list tracker-list gnome org http://mail.gnome.org/mailman/listinfo/tracker-list
Attachment:
tracker-metadata-values-v2.patch
Description: Text Data