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)
}
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) {
......@@ -475,7 +475,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
uri);
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) {
......
......@@ -85,16 +85,11 @@ read_toc (PopplerIndexIter *index,
switch (action->type) {
case POPPLER_ACTION_GOTO_DEST: {
PopplerActionGotoDest *ag = (PopplerActionGotoDest *)action;
PopplerDest *agd = ag->dest;
if (!tracker_is_empty_string (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;
}
......
......@@ -361,11 +361,11 @@ read_metadata (TrackerResource *metadata,
keywords = g_ptr_array_new_with_free_func ((GDestroyNotify) g_free);
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) {
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 */
......@@ -384,11 +384,11 @@ read_metadata (TrackerResource *metadata,
uri);
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) {
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,
......
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