mirror of
https://github.com/fergalmoran/dss.radio.git
synced 2025-12-22 01:37:58 +00:00
Added extra logging to server
This commit is contained in:
12
ice_relay.py
12
ice_relay.py
@@ -85,20 +85,26 @@ class IceRelay(Thread):
|
|||||||
log = False
|
log = False
|
||||||
|
|
||||||
def default_queue(self):
|
def default_queue(self):
|
||||||
|
ret = []
|
||||||
try:
|
try:
|
||||||
r = requests.get('http://{}/mix/?random=True&limit=1'.format(self.api_host)) \
|
r = requests.get('http://{}/mix/?random=True&limit=1'.format(self.api_host)) \
|
||||||
.json().get('results')[0].get('slug')
|
.json().get('results')[0].get('slug')
|
||||||
r = requests.get('http://{}/mix/{}/stream_url'.format(self.api_host, r))
|
r = requests.get('http://{}/mix/{}/stream_url'.format(self.api_host, r))
|
||||||
url = r.json()['url']
|
url = r.json()['url']
|
||||||
return [
|
ret = [
|
||||||
url
|
url
|
||||||
]
|
]
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
logging.error(ex)
|
logging.error(ex)
|
||||||
return [
|
ret = [
|
||||||
'https://dsscdn.blob.core.windows.net/mixes/52df41af-5f81-4f00-a9a8-9ffb5dc3185f.mp3'
|
'https://dsscdn.blob.core.windows.net/mixes/52df41af-5f81-4f00-a9a8-9ffb5dc3185f.mp3'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
for p in ret:
|
||||||
|
print("Playing {}".format(p))
|
||||||
|
|
||||||
|
return ret
|
||||||
|
|
||||||
def set_audio_queue(self, queue):
|
def set_audio_queue(self, queue):
|
||||||
self.audio_queue = queue
|
self.audio_queue = queue
|
||||||
self._ended = True
|
self._ended = True
|
||||||
|
|||||||
Reference in New Issue
Block a user