tracker r2865 - in trunk: . src/tracker-extract
- From: mottela svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2865 - in trunk: . src/tracker-extract
- Date: Thu, 29 Jan 2009 22:16:21 +0000 (UTC)
Author: mottela
Date: Thu Jan 29 22:16:21 2009
New Revision: 2865
URL: http://svn.gnome.org/viewvc/tracker?rev=2865&view=rev
Log:
Added a default value to Image:Date
Modified:
trunk/ChangeLog
trunk/src/tracker-extract/tracker-extract-gstreamer.c
Modified: trunk/src/tracker-extract/tracker-extract-gstreamer.c
==============================================================================
--- trunk/src/tracker-extract/tracker-extract-gstreamer.c (original)
+++ trunk/src/tracker-extract/tracker-extract-gstreamer.c Thu Jan 29 22:16:21 2009
@@ -62,6 +62,8 @@
#include <gst/gst.h>
#include <gst/tag/tag.h>
+#include <libtracker-common/tracker-type-utils.h>
+
#include "tracker-extract.h"
#include "tracker-albumart.h"
@@ -974,8 +976,24 @@
g_strdup ("Video:Duration"),
g_strdup ("0"));
}
+ } else if (type == EXTRACT_MIME_IMAGE) {
+ if (!g_hash_table_lookup (metadata, "Image:Date")) {
+ struct stat st;
+
+ if (g_lstat(uri, &st) >= 0) {
+ gchar *date;
+
+ date = tracker_date_to_string (st.st_mtime);
+
+ g_hash_table_insert (metadata,
+ g_strdup ("Image:Date"),
+ tracker_escape_metadata (date));
+ g_free (date);
+ }
+ }
}
+
/* Also clean up */
gst_element_set_state (extractor->playbin, GST_STATE_NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]