Esempio n. 1
0
def test105():
	server.request_stream({'categoryid':'10','subcategoryid':'9','latitude':'47.67304230','longitude':'-122.36764526'})
	return
Esempio n. 2
0
def test95():
	server.request_stream({'categoryid':'10','subcategoryid':'9','latitude':'20','longitude':'-20'})
	return
Esempio n. 3
0
form = cgi.FieldStorage() 

logging.basicConfig(
	filename=settings.config["log_file"],
	filemode="a",
	level=logging.DEBUG,
	format='%(asctime)s %(filename)s:%(lineno)d %(levelname)s %(message)s',
)

if form.getvalue('config'):
	settings.initialize_config(
		os.path.join(
			'/etc/roundware/',
			form.getvalue('config')))

dict_form = server.form_to_dict(form)
result = server.request_stream(dict_form)
url = result['STREAM_URL']
num_rec = server.number_of_recordings(dict_form)

print "Content-type: text/html"
print
print "<html><head><title>Roundware - Listen</title></head><body>"
print "<p>" + str(num_rec) + " recordings match your selection."
print "<p>You can use the <a href=\""+url+"\">MP3 url</a> or the "
print "<a href=\""+url+".m3u\">M3U url</a>."
print "<p>You can <a href=\"/cgi-bin/control.py?stream_url="+url+"\">control</a> your stream too.</p>"
print "</body></html>"