[rygel] tracker: Use supplied date when creating an item.
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] tracker: Use supplied date when creating an item.
- Date: Tue, 21 Feb 2012 13:50:18 +0000 (UTC)
commit eb084a38f727c631733c1376cbe1b0fc726ca5cd
Author: Jens Georg <mail jensge org>
Date: Tue Feb 21 11:36:02 2012 +0200
tracker: Use supplied date when creating an item.
.../tracker/rygel-tracker-insertion-query.vala | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-insertion-query.vala b/src/plugins/tracker/rygel-tracker-insertion-query.vala
index ba5d1b2..61f95ff 100644
--- a/src/plugins/tracker/rygel-tracker-insertion-query.vala
+++ b/src/plugins/tracker/rygel-tracker-insertion-query.vala
@@ -91,8 +91,14 @@ public class Rygel.Tracker.InsertionQuery : Query {
triplets.add (new QueryTriplet (QUERY_ID,
"nie:url",
"\"" + item.uris[0] + "\""));
- var now = TimeVal ();
- var date = now.to_iso8601 ();
+ string date;
+ if (item.date == null) {
+ var now = TimeVal ();
+ date = now.to_iso8601 ();
+ } else {
+ // Rygel core makes sure that this is a valid ISO8601 date.
+ date = item.date;
+ }
triplets.add (new QueryTriplet (QUERY_ID,
"nie:contentCreated",
"\"" + date + "\""));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]