Fix double loading of songs when using remote's search and setting the song live after.

This commit is contained in:
Mattias Põldaru 2012-03-17 08:24:42 +02:00
parent 76221b4f52
commit 103d38d016
2 changed files with 3 additions and 0 deletions

View File

@ -93,6 +93,7 @@ window.OpenLP = {
li.children("a").click(OpenLP.setSlide);
ul.append(li);
}
OpenLP.currentItem = data.results.item;
ul.listview("refresh");
}
);

View File

@ -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])