[tracker] Added missing fields for PNG extractor
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] Added missing fields for PNG extractor
- Date: Mon, 7 Sep 2009 12:08:57 +0000 (UTC)
commit c58901b2c0ec8dc6a8b993f78c7c745ceb4cab18
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Sep 7 14:08:02 2009 +0200
Added missing fields for PNG extractor
src/tracker-extract/tracker-extract-png.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-png.c b/src/tracker-extract/tracker-extract-png.c
index cecbe21..4243d70 100644
--- a/src/tracker-extract/tracker-extract-png.c
+++ b/src/tracker-extract/tracker-extract-png.c
@@ -57,7 +57,7 @@
#define RDF_PREFIX TRACKER_RDF_PREFIX
typedef struct {
- gchar *title, *copyright, *creator, *description, *date;
+ gchar *title, *copyright, *creator, *description, *date, *license;
} PngNeedsMergeData;
typedef struct {
@@ -195,6 +195,9 @@ read_metadata (png_structp png_ptr, png_infop info_ptr, const gchar *uri, Tracke
merge_data.copyright = tracker_coalesce (2, png_data.copyright,
xmp_data.rights);
+ merge_data.license = tracker_coalesce (2, png_data.disclaimer,
+ xmp_data.license);
+
merge_data.description = tracker_coalesce (2, png_data.description,
xmp_data.description);
@@ -202,6 +205,17 @@ read_metadata (png_structp png_ptr, png_infop info_ptr, const gchar *uri, Tracke
xmp_data.date,
xmp_data.DateTimeOriginal);
+
+ if (png_data.comment) {
+ tracker_statement_list_insert (metadata, uri, NIE_PREFIX "comment", png_data.comment);
+ g_free (png_data.comment);
+ }
+
+ if (merge_data.license) {
+ tracker_statement_list_insert (metadata, uri, NIE_PREFIX "license", merge_data.license);
+ g_free (merge_data.license);
+ }
+
if (merge_data.creator) {
tracker_statement_list_insert (metadata, ":", RDF_PREFIX "type", NCO_PREFIX "Contact");
tracker_statement_list_insert (metadata, ":", NCO_PREFIX "fullname", merge_data.creator);
@@ -282,11 +296,6 @@ read_metadata (png_structp png_ptr, png_infop info_ptr, const gchar *uri, Tracke
g_free (xmp_data.coverage);
}
- if (xmp_data.license) {
- tracker_statement_list_insert (metadata, uri, NIE_PREFIX "license", xmp_data.license);
- g_free (xmp_data.license);
- }
-
if (xmp_data.Make || xmp_data.Model) {
gchar *final_camera = tracker_coalesce (2, xmp_data.Make, xmp_data.Model);
tracker_statement_list_insert (metadata, uri, NMM_PREFIX "camera", final_camera);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]