|
|
@ -86,6 +86,29 @@ class Audio(Bureau):
|
|
|
|
self.log.debug("info output:" + out)
|
|
|
|
self.log.debug("info output:" + out)
|
|
|
|
self.print_small(out)
|
|
|
|
self.print_small(out)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@add_webview("radio", "radio")
|
|
|
|
|
|
|
|
def radio_webview(self, data=None):
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
Edit internet radio stations.
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
#TODO: allow deletes
|
|
|
|
|
|
|
|
#TODO: show existing stations
|
|
|
|
|
|
|
|
#TODO: print out any new station
|
|
|
|
|
|
|
|
#TODO: use some kind of nicer templates?
|
|
|
|
|
|
|
|
ret = """
|
|
|
|
|
|
|
|
<html><head><title>screenless office - internet radio admin</title></head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<h1>Audio Department</h1>
|
|
|
|
|
|
|
|
<h2>Radio Stations<h2>
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
if data:
|
|
|
|
|
|
|
|
if data["addurl"]:
|
|
|
|
|
|
|
|
self.save_url(data["addurl"])
|
|
|
|
|
|
|
|
ret += "<div>New station " + data["addurl"] + " saved!</div>\n"
|
|
|
|
|
|
|
|
ret += "</body></html>"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ret
|
|
|
|
|
|
|
|
|
|
|
|
def save_url(self, url):
|
|
|
|
def save_url(self, url):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
saves an url for a local file or network audio stream.
|
|
|
|
saves an url for a local file or network audio stream.
|
|
|
|