Commit 12903399 authored by Sam Thursfield's avatar Sam Thursfield

Merge branch 'wip/carlosg/extraction-warnings' into 'master'

Extraction warning fixes

Closes #12 and #13

See merge request GNOME/tracker-miners!13
parents 7b5aabf1 78b35504
...@@ -416,7 +416,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info) ...@@ -416,7 +416,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
} }
if (md.copyright) { if (md.copyright) {
tracker_resource_set_string (metadata, "nie:copyright", md.copyright); tracker_guarantee_resource_utf8_string (metadata, "nie:copyright", md.copyright);
} }
if (md.white_balance) { if (md.white_balance) {
...@@ -475,7 +475,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info) ...@@ -475,7 +475,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
uri); uri);
if (md.description) { if (md.description) {
tracker_resource_set_string(metadata, "nie:description", md.description); tracker_guarantee_resource_utf8_string (metadata, "nie:description", md.description);
} }
if (md.metering_mode) { if (md.metering_mode) {
......
...@@ -85,16 +85,11 @@ read_toc (PopplerIndexIter *index, ...@@ -85,16 +85,11 @@ read_toc (PopplerIndexIter *index,
switch (action->type) { switch (action->type) {
case POPPLER_ACTION_GOTO_DEST: { case POPPLER_ACTION_GOTO_DEST: {
PopplerActionGotoDest *ag = (PopplerActionGotoDest *)action; PopplerActionGotoDest *ag = (PopplerActionGotoDest *)action;
PopplerDest *agd = ag->dest;
if (!tracker_is_empty_string (ag->title)) { if (!tracker_is_empty_string (ag->title)) {
g_string_append_printf (*toc, "%s ", ag->title); g_string_append_printf (*toc, "%s ", ag->title);
} }
if (!tracker_is_empty_string (agd->named_dest)) {
g_string_append_printf (*toc, "%s ", agd->named_dest);
}
break; break;
} }
......
...@@ -361,11 +361,11 @@ read_metadata (TrackerResource *metadata, ...@@ -361,11 +361,11 @@ read_metadata (TrackerResource *metadata,
keywords = g_ptr_array_new_with_free_func ((GDestroyNotify) g_free); keywords = g_ptr_array_new_with_free_func ((GDestroyNotify) g_free);
if (md.comment) { if (md.comment) {
tracker_resource_set_string (metadata, "nie:comment", md.comment); tracker_guarantee_resource_utf8_string (metadata, "nie:comment", md.comment);
} }
if (md.license) { if (md.license) {
tracker_resource_set_string (metadata, "nie:license", md.license); tracker_guarantee_resource_utf8_string (metadata, "nie:license", md.license);
} }
/* TODO: add ontology and store this ed->software */ /* TODO: add ontology and store this ed->software */
...@@ -384,11 +384,11 @@ read_metadata (TrackerResource *metadata, ...@@ -384,11 +384,11 @@ read_metadata (TrackerResource *metadata,
uri); uri);
if (md.description) { if (md.description) {
tracker_resource_set_string (metadata, "nie:description", md.description); tracker_guarantee_resource_utf8_string (metadata, "nie:description", md.description);
} }
if (md.copyright) { if (md.copyright) {
tracker_resource_set_string (metadata, "nie:copyright", md.copyright); tracker_guarantee_resource_utf8_string (metadata, "nie:copyright", md.copyright);
} }
tracker_guarantee_resource_title_from_file (metadata, tracker_guarantee_resource_title_from_file (metadata,
......
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