Fixed up some things for the merge proposal.

This commit is contained in:
Raoul Snyman 2011-03-16 14:04:11 +02:00
parent 955933237c
commit 60371ffa0a

View File

@ -78,9 +78,6 @@ the remotes.
``last`` ``last``
Load the last slide. Load the last slide.
``text``
Request the text of the current slide.
``/api/service/{action}`` ``/api/service/{action}``
Perform ``{action}`` on the service manager (e.g. go live). Data is Perform ``{action}`` on the service manager (e.g. go live). Data is
passed as a json-encoded ``data`` parameter. Valid actions are: passed as a json-encoded ``data`` parameter. Valid actions are:
@ -188,23 +185,12 @@ class HttpServer(object):
Slide change listener. Store the item and tell the clients Slide change listener. Store the item and tell the clients
""" """
self.current_slide = row self.current_slide = row
#self.send_poll()
def item_change(self, items): def item_change(self, items):
""" """
Item (song) change listener. Store the slide and tell the clients Item (song) change listener. Store the slide and tell the clients
""" """
self.current_item = items[0] self.current_item = items[0]
#log.debug(pformat(items[0].__dict__, 2))
#self.send_poll()
def send_poll(self):
"""
Tell the clients something has changed
"""
Receiver.send_message(u'remotes_poll_response',
{'slide': self.current_slide,
'item': self.current_item})
def new_connection(self): def new_connection(self):
""" """
@ -418,8 +404,6 @@ class HttpConnection(object):
else: else:
Receiver.send_message(event) Receiver.send_message(event)
json_data = {u'results': {u'success': True}} json_data = {u'results': {u'success': True}}
#if action == u'text':
# json_data = {u'results': }
return HttpResponse(json.dumps(json_data), return HttpResponse(json.dumps(json_data),
{u'Content-Type': u'application/json'}) {u'Content-Type': u'application/json'})