From d7f741e0a3d19de5b78e280f5d8179df5a24337e Mon Sep 17 00:00:00 2001 From: Jens Georg Date: Thu, 10 Nov 2011 11:31:29 +0100 Subject: [PATCH] tracker: Cache ContainerUpdateID Fixes DLNA Testcase 7.3.56.1 --- src/plugins/tracker/rygel-tracker-search-container.vala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/plugins/tracker/rygel-tracker-search-container.vala b/src/plugins/tracker/rygel-tracker-search-container.vala index 40f5f36..59c9968 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 update_id_hash; + public SearchContainer (string id, MediaContainer parent, string title, @@ -49,6 +51,20 @@ public class Rygel.Tracker.SearchContainer : SimpleContainer { ArrayList? filters = null) { base (id, parent, title); + if (unlikely (update_id_hash == null)) { + update_id_hash = new HashMap (); + } + + 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 (); -- 2.7.4