Commit c17d11ec authored by Carlos Garnacho's avatar Carlos Garnacho

tracker-extract: Insert nmm:whiteBalance 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 80ebde53
......@@ -987,7 +987,11 @@ tracker_xmp_apply_to_resource (TrackerResource *resource,
}
if (data->white_balance) {
tracker_resource_set_string (resource, "nmm:whiteBalance", data->white_balance);
TrackerResource *white_balance;
white_balance = tracker_resource_new (data->white_balance);
tracker_resource_set_relation (resource, "nmm:meteringMode", white_balance);
g_object_unref (white_balance);
}
if (data->fnumber) {
......
......@@ -310,7 +310,11 @@ read_metadata (GifFileType *gifFile,
}
if (xd->white_balance) {
tracker_resource_set_string (metadata, "nmm:whiteBalance", xd->white_balance);
TrackerResource *white_balance;
white_balance = tracker_resource_new (xd->white_balance);
tracker_resource_set_relation (metadata, "nmm:meteringMode", white_balance);
g_object_unref (white_balance);
}
if (xd->fnumber) {
......
......@@ -410,7 +410,11 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
if (md.white_balance) {
tracker_resource_set_string (metadata, "nmm:whiteBalance", md.white_balance);
TrackerResource *white_balance;
white_balance = tracker_resource_new (md.white_balance);
tracker_resource_set_relation (metadata, "nmm:meteringMode", white_balance);
g_object_unref (white_balance);
}
if (md.fnumber) {
......
......@@ -474,7 +474,11 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
if (xd->white_balance) {
tracker_resource_set_string (metadata, "nmm:whiteBalance", xd->white_balance);
TrackerResource *white_balance;
white_balance = tracker_resource_new (xd->white_balance);
tracker_resource_set_relation (metadata, "nmm:meteringMode", white_balance);
g_object_unref (white_balance);
}
if (xd->fnumber) {
......
......@@ -426,7 +426,11 @@ read_metadata (TrackerResource *metadata,
}
if (md.white_balance) {
tracker_resource_set_string (metadata, "nmm:whiteBalance", md.white_balance);
TrackerResource *white_balance;
white_balance = tracker_resource_new (md.white_balance);
tracker_resource_set_relation (metadata, "nmm:meteringMode", white_balance);
g_object_unref (white_balance);
}
if (md.fnumber) {
......
......@@ -538,7 +538,11 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
if (md.white_balance) {
tracker_resource_set_string (metadata, "nmm:whiteBalance", md.white_balance);
TrackerResource *white_balance;
white_balance = tracker_resource_new (md.white_balance);
tracker_resource_set_relation (metadata, "nmm:meteringMode", white_balance);
g_object_unref (white_balance);
}
if (md.fnumber) {
......
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