[tracker] tracker-writeback: XMP: Take into account mlo:asPostalAddress
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-writeback: XMP: Take into account mlo:asPostalAddress
- Date: Thu, 23 Dec 2010 16:32:01 +0000 (UTC)
commit 027b0da1cf85c14522bbaccb7b17c7f42954c56b
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Dec 23 17:31:36 2010 +0100
tracker-writeback: XMP: Take into account mlo:asPostalAddress
Fixed NB#214163
src/tracker-writeback/tracker-writeback-xmp.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-writeback/tracker-writeback-xmp.c b/src/tracker-writeback/tracker-writeback-xmp.c
index 7a31302..31b7786 100644
--- a/src/tracker-writeback/tracker-writeback-xmp.c
+++ b/src/tracker-writeback/tracker-writeback-xmp.c
@@ -394,11 +394,14 @@ writeback_xmp_update_file_metadata (TrackerWritebackFile *wbf,
GError *error = NULL;
gchar *query;
- query = g_strdup_printf ("SELECT mlo:city (?location) mlo:state (?location) "
- " mlo:address (?location) "
- " mlo:country (?location) "
+ query = g_strdup_printf ("SELECT "
+ "tracker:coalesce (mlo:city (?location), nco:locality (mlo:asPostalAddress (?location))) "
+ "tracker:coalesce (mlo:state (?location), nco:region (mlo:asPostalAddress (?location))) "
+ "tracker:coalesce (mlo:address (?location), nco:streetAddress (mlo:asPostalAddress (?location))) "
+ "tracker:coalesce (mlo:country (?location), nco:country (mlo:asPostalAddress (?location))) "
"WHERE { <%s> mlo:location ?location }",
row[1]); /* The urn is at 1 */
+
cursor = tracker_sparql_connection_query (connection, query, NULL, &error);
g_free (query);
if (!error) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]