Fixed post flow

This commit is contained in:
Fergal Moran
2015-10-19 21:06:54 +01:00
parent 2013130458
commit 8434b49667
2 changed files with 11 additions and 7 deletions

View File

@@ -42,13 +42,12 @@ def get_server_details():
def shuffle():
url = "http://%s:%s/a/shuffle" % (settings.RADIO_HOST, settings.RADIO_PORT)
r = requests.post(url)
def play(url):
url = "http://%s:%s/a/shuffle" % (settings.RADIO_HOST, settings.RADIO_PORT)
url = "http://{}:{}/a/shuffle".format(settings.RADIO_HOST, settings.RADIO_PORT)
r = requests.post(url)
def play(item):
url = "http://{}:{}/a/play".format(settings.RADIO_HOST, settings.RADIO_PORT)
r = requests.post(url, data=item)
if __name__ == '__main__':
d = get_server_details("localhost", "8000", "dss")