Commit 80ebde53 authored by Carlos Garnacho's avatar Carlos Garnacho

tracker-extract: Insert nmm:meteringMode as a resource

This is not an string, but a builtin class, so it must be dealt
with as a resource.

https://bugzilla.gnome.org/show_bug.cgi?id=776723
parent ff23cc07
......@@ -1035,7 +1035,11 @@ tracker_xmp_apply_to_resource (TrackerResource *resource,
}
if (data->metering_mode) {
tracker_resource_set_string (resource, "nmm:meteringMode", data->metering_mode);
TrackerResource *metering;
metering = tracker_resource_new (data->metering_mode);
tracker_resource_set_relation (resource, "nmm:meteringMode", metering);
g_object_unref (metering);
}
if (data->creator) {
......
......@@ -330,7 +330,11 @@ read_metadata (GifFileType *gifFile,
}
if (xd->metering_mode) {
tracker_resource_set_string (metadata, "nmm:meteringMode", xd->metering_mode);
TrackerResource *metering;
metering = tracker_resource_new (xd->metering_mode);
tracker_resource_set_relation (metadata, "nmm:meteringMode", metering);
g_object_unref (metering);
}
keywords = g_ptr_array_new_with_free_func ((GDestroyNotify) g_free);
......
......@@ -465,7 +465,11 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
if (md.metering_mode) {
tracker_resource_set_string(metadata, "nmm:meteringMode", md.metering_mode);
TrackerResource *metering;
metering = tracker_resource_new (md.metering_mode);
tracker_resource_set_relation (metadata, "nmm:meteringMode", metering);
g_object_unref (metering);
}
if (md.creator) {
......
......@@ -533,7 +533,11 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
if (xd->metering_mode) {
tracker_resource_set_string (metadata, "nmm:meteringMode", xd->metering_mode);
TrackerResource *metering;
metering = tracker_resource_new (xd->metering_mode);
tracker_resource_set_relation (metadata, "nmm:meteringMode", metering);
g_object_unref (metering);
}
if (xd->address || xd->state || xd->country || xd->city ||
......
......@@ -446,9 +446,12 @@ read_metadata (TrackerResource *metadata,
}
if (md.metering_mode) {
tracker_resource_set_string (metadata, "nmm:meteringMode", md.metering_mode);
}
TrackerResource *metering;
metering = tracker_resource_new (md.metering_mode);
tracker_resource_set_relation (metadata, "nmm:meteringMode", metering);
g_object_unref (metering);
}
if (xd->keywords) {
tracker_keywords_parse (keywords, xd->keywords);
......
......@@ -583,7 +583,11 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
if (md.metering_mode) {
tracker_resource_set_string (metadata, "nmm:meteringMode", md.metering_mode);
TrackerResource *metering;
metering = tracker_resource_new (md.metering_mode);
tracker_resource_set_relation (metadata, "nmm:meteringMode", metering);
g_object_unref (metering);
}
if (md.creator) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment