[tracker/tracker-0.14] libtracker-extract: Fixed EXIF extractor due to	changes by libexif
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [tracker/tracker-0.14] libtracker-extract: Fixed EXIF extractor due to	changes by libexif
- Date: Wed, 24 Oct 2012 16:18:39 +0000 (UTC)
commit 17c686c8803a7684a195266ad80050b8bbf82d49
Author: Martyn Russell <martyn lanedo com>
Date:   Thu Sep 20 13:28:05 2012 +0100
    libtracker-extract: Fixed EXIF extractor due to changes by libexif
    
    Seems libexif now appends " (Photographer) - [None] (Editor)", previously it
    was the same string without the "[None]", which broke our hack to work around
    this superfluous information. Test cases now pass
 src/libtracker-extract/tracker-exif.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-exif.c b/src/libtracker-extract/tracker-exif.c
index 280621e..371b30b 100644
--- a/src/libtracker-extract/tracker-exif.c
+++ b/src/libtracker-extract/tracker-exif.c
@@ -461,11 +461,19 @@ parse_exif (const unsigned char *buffer,
 	if (!data->copyright) {
 		gchar *strip_off;
 		data->copyright = get_value (exif, EXIF_TAG_COPYRIGHT);
-		/* exiftool catenates this to the string, so we don't need it */
 		if (data->copyright) {
-			strip_off = strstr (data->copyright, " (Photographer) -  (Editor)");
+			/* Exif catenates this to the string, noticed the
+			 * string change from below in libexif 0.6.20 */
+			strip_off = strstr (data->copyright, " (Photographer) - [None] (Editor)");
 			if (strip_off) {
 				*strip_off = '\0';
+			} else {
+				/* Fall back to old string */
+				strip_off = strstr (data->copyright, " (Photographer) -  (Editor)");
+
+				if (strip_off) {
+					*strip_off = '\0';
+				}
 			}
 		}
 	}
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]