[tracker] 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] libtracker-extract: Fixed EXIF extractor due to changes by libexif
- Date: Thu, 20 Sep 2012 12:50:48 +0000 (UTC)
commit 853a042da4224aee2851700a083e2d7520bba9a7
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]