trying out web view for internet radio station management

workspace
Brendan Howell 4 years ago
parent 00f826a18a
commit ad4b711ca3

@ -549,13 +549,20 @@ class Bureau(object):
continue
self.log.debug("got method: " + ref)
if (ref in self.commands) or (ref in self.api):
if (ref in self.commands) or (ref in self.api) or
(ref in self.webviews):
if ref in self.api:
if data:
data = json.loads(data)
ret = json.dumps(self.api[ref](data))
else:
ret = json.dumps(self.api[ref]())
elif ref in self.webviews:
if data:
data = json.loads(data)
ret = json.dumps(self.webviews[ref](data))
else:
ret = json.dumps(self.webviews[ref]())
else:
if data:
ret = self.commands[ref](data)

Loading…
Cancel
Save