Commit dbd02112 authored by Carlos Garnacho's avatar Carlos Garnacho

tracker-extract: Insert nfo:orientation 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 c17d11ec
......@@ -977,7 +977,11 @@ tracker_xmp_apply_to_resource (TrackerResource *resource,
}
if (data->orientation) {
tracker_resource_set_string (resource, "nfo:orientation", data->orientation);
TrackerResource *orientation;
orientation = tracker_resource_new (data->orientation);
tracker_resource_set_relation (resource, "nfo:orientation", orientation);
g_object_unref (orientation);
}
if (data->rights || data->copyright) {
......
......@@ -298,7 +298,11 @@ read_metadata (GifFileType *gifFile,
}
if (xd->orientation) {
tracker_resource_set_string (metadata, "nfo:orientation", xd->orientation);
TrackerResource *orientation;
orientation = tracker_resource_new (xd->orientation);
tracker_resource_set_relation (metadata, "nfo:orientation", orientation);
g_object_unref (orientation);
}
if (xd->exposure_time) {
......
......@@ -402,7 +402,11 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
NULL);
if (md.orientation) {
tracker_resource_set_string (metadata, "nfo:orientation", md.orientation);
TrackerResource *orientation;
orientation = tracker_resource_new (md.orientation);
tracker_resource_set_relation (metadata, "nfo:orientation", orientation);
g_object_unref (orientation);
}
if (md.copyright) {
......
......@@ -466,7 +466,11 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
if (xd->orientation) {
tracker_resource_set_string (metadata, "nfo:orientation", xd->orientation);
TrackerResource *orientation;
orientation = tracker_resource_new (xd->orientation);
tracker_resource_set_relation (metadata, "nfo:orientation", orientation);
g_object_unref (orientation);
}
if (xd->rights) {
......
......@@ -414,7 +414,11 @@ read_metadata (TrackerResource *metadata,
}
if (md.orientation) {
tracker_resource_set_string (metadata, "nfo:orientation", md.orientation);
TrackerResource *orientation;
orientation = tracker_resource_new (md.orientation);
tracker_resource_set_relation (metadata, "nfo:orientation", orientation);
g_object_unref (orientation);
}
if (md.exposure_time) {
......
......@@ -530,7 +530,11 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
NULL);
if (md.orientation) {
tracker_resource_set_string (metadata, "nfo:orientation", md.orientation);
TrackerResource *orientation;
orientation = tracker_resource_new (md.orientation);
tracker_resource_set_relation (metadata, "nfo:orientation", orientation);
g_object_unref (orientation);
}
if (md.copyright) {
......
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