Re: [Tracker] tracker & nautilus integration += metatags



I've found tracker_metadata_get in tracker.h. This seems the closest
function with that features.
I used it in this way, but I always get an error. The folder is
watched, and if I search for music.mp3 tracker finds the file.
error:
Entity with ID file:///home/yelo3/Documenti/music.mp3 and service
Music was not found in database
maybe the "id" is not the file uri...

code:

TrackerClient* client = NULL;
client = tracker_connect(TRUE);
g_assert(client);
const char* id = "file:///home/yelo3/Documenti/music.mp3";
char* keys[] = {"Audio.Artist", NULL};
GError *error = NULL;
char** result = tracker_metadata_get(client, SERVICE_MUSIC, id, keys, &error);

if (error != NULL)
{
        printf("%s\n", error->message);
}
        
char** resutl_start = result;
while (result)
{
        printf("%s\n", *result);
        g_free(*result);
        result = result + 1;
}
g_free(result);
        
tracker_disconnect(client);



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