Re: [Tracker] Querying values of metadata keys



Hi again,

forget my last email, the patch works fine against r1241. Sorry for the
spam.

Iago

El vie, 25-04-2008 a las 08:39 +0200, Iago Toral Quiroga escribiÃ:
Hi,

tested the original patch against r1241. Now it does not make the daemon
segfault, but still I do not get any results. This is what I'm doing:

  char *keys[] = {"Audio:Title", NULL};

  char **result =
    tracker_metadata_get (tc, SERVICE_MUSIC,
                          "path/to/mp3/file",
                          keys, &error);

/* I get a proper value for the clip title */

  result = 
    tracker_metadata_get_unique_values (tc, "Audio:Title", 0, 10, 
                                        &error);

/* I get and empty array */

Iago

El miÃ, 23-04-2008 a las 19:17 +0300, Ottela Mikael escribiÃ:
Hello,

I should have mentioned that it was a patch against the old revision 1241 (as can be seen from the diff 
itself). I am assuming you patched it against some other version. Could you try it against the old one to 
see if you can still find problems with it? It was a patch created already some time ago.

My apologies,

Mikael


________________________________________
From: itoral igalia com [itoral igalia com]
Sent: Wednesday, April 23, 2008 6:46 PM
To: Ottela Mikael
Cc: Iago Toral Quiroga; tracker-list gnome org
Subject: RE: [Tracker] Querying values of metadata keys

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

Iago



Hello,

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




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]