From 103d38d016b609313b51852ad5653e2220ba6f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20P=C3=B5ldaru?= Date: Sat, 17 Mar 2012 08:24:42 +0200 Subject: [PATCH] Fix double loading of songs when using remote's search and setting the song live after. --- openlp/plugins/remotes/html/openlp.js | 1 + openlp/plugins/remotes/lib/httpserver.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/openlp/plugins/remotes/html/openlp.js b/openlp/plugins/remotes/html/openlp.js index 93197b160..686b61e29 100644 --- a/openlp/plugins/remotes/html/openlp.js +++ b/openlp/plugins/remotes/html/openlp.js @@ -93,6 +93,7 @@ window.OpenLP = { li.children("a").click(OpenLP.setSlide); ul.append(li); } + OpenLP.currentItem = data.results.item; ul.listview("refresh"); } ); diff --git a/openlp/plugins/remotes/lib/httpserver.py b/openlp/plugins/remotes/lib/httpserver.py index 67ab34a18..45aa78418 100644 --- a/openlp/plugins/remotes/lib/httpserver.py +++ b/openlp/plugins/remotes/lib/httpserver.py @@ -463,6 +463,8 @@ class HttpConnection(object): item[u'selected'] = (self.parent.current_slide == index) data.append(item) json_data = {u'results': {u'slides': data}} + if current_item: + json_data[u'results'][u'item'] = self.parent.current_item._uuid else: if self.url_params and self.url_params.get(u'data'): data = json.loads(self.url_params[u'data'][0])