[rygel/rygel-0-12] tracker: Cache ContainerUpdateID
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/rygel-0-12] tracker: Cache ContainerUpdateID
- Date: Thu, 8 Dec 2011 09:53:01 +0000 (UTC)
commit 02c3f88503e89e1742cac7c7f358b0ffa80cc7e2
Author: Jens Georg <mail jensge org>
Date: Thu Nov 10 11:31:29 2011 +0100
tracker: Cache ContainerUpdateID
Fixes DLNA Testcase 7.3.56.1
.../tracker/rygel-tracker-search-container.vala | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-search-container.vala b/src/plugins/tracker/rygel-tracker-search-container.vala
index c3762d9..bef5733 100644
--- a/src/plugins/tracker/rygel-tracker-search-container.vala
+++ b/src/plugins/tracker/rygel-tracker-search-container.vala
@@ -41,6 +41,8 @@ public class Rygel.Tracker.SearchContainer : SimpleContainer {
private ResourcesIface resources;
+ private static HashMap<string, uint> update_id_hash;
+
public SearchContainer (string id,
MediaContainer parent,
string title,
@@ -49,6 +51,20 @@ public class Rygel.Tracker.SearchContainer : SimpleContainer {
ArrayList<string>? filters = null) {
base (id, parent, title);
+ if (unlikely (update_id_hash == null)) {
+ update_id_hash = new HashMap<string, uint> ();
+ }
+
+ if (update_id_hash.has_key (this.id)) {
+ this.update_id = update_id_hash[this.id];
+ }
+
+ this.container_updated.connect ( (_, b) => {
+ if (b == this) {
+ update_id_hash[this.id] = this.update_id;
+ }
+ });
+
this.item_factory = item_factory;
var variables = new ArrayList<string> ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]