Commit ff23cc07 authored by Carlos Garnacho's avatar Carlos Garnacho

tracker-extract: Insert nmm:flash 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 87e71075
......@@ -995,7 +995,11 @@ tracker_xmp_apply_to_resource (TrackerResource *resource,
}
if (data->flash) {
tracker_resource_set_string (resource, "nmm:flash", data->flash);
TrackerResource *flash;
flash = tracker_resource_new (data->flash);
tracker_resource_set_relation (resource, "nmm:flash", flash);
g_object_unref (flash);
}
if (data->focal_length) {
......
......@@ -318,7 +318,12 @@ read_metadata (GifFileType *gifFile,
}
if (xd->flash) {
tracker_resource_set_string (metadata, "nmm:flash", xd->flash); }
TrackerResource *flash;
flash = tracker_resource_new (xd->flash);
tracker_resource_set_relation (metadata, "nmm:flash", flash);
g_object_unref (flash);
}
if (xd->focal_length) {
tracker_resource_set_string (metadata, "nmm:focalLength", xd->focal_length);
......
......@@ -421,7 +421,11 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
if (md.flash) {
tracker_resource_set_string (metadata, "nmm:flash", md.flash);
TrackerResource *flash;
flash = tracker_resource_new (md.flash);
tracker_resource_set_relation (metadata, "nmm:flash", flash);
g_object_unref (flash);
}
if (md.focal_length) {
......
......@@ -485,7 +485,11 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
if (xd->flash) {
tracker_resource_set_string (metadata, "nmm:flash", xd->flash);
TrackerResource *flash;
flash = tracker_resource_new (xd->flash);
tracker_resource_set_relation (metadata, "nmm:flash", flash);
g_object_unref (flash);
}
if (xd->focal_length) {
......
......@@ -434,7 +434,12 @@ read_metadata (TrackerResource *metadata,
}
if (md.flash) {
tracker_resource_set_string (metadata, "nmm:flash", md.flash); }
TrackerResource *flash;
flash = tracker_resource_new (md.flash);
tracker_resource_set_relation (metadata, "nmm:flash", flash);
g_object_unref (flash);
}
if (md.focal_length) {
tracker_resource_set_string (metadata, "nmm:focalLength", md.focal_length);
......
......@@ -546,7 +546,12 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
if (md.flash) {
tracker_resource_set_string (metadata, "nmm:flash", md.flash); }
TrackerResource *flash;
flash = tracker_resource_new (md.flash);
tracker_resource_set_relation (metadata, "nmm:flash", flash);
g_object_unref (flash);
}
if (md.focal_length) {
tracker_resource_set_string (metadata, "nmm:focalLength", md.focal_length);
......
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