mirror of
https://github.com/fergalmoran/dss.radio.git
synced 2025-12-22 09:48:21 +00:00
Added extra logging to server
This commit is contained in:
10
ice_relay.py
10
ice_relay.py
@@ -85,20 +85,26 @@ class IceRelay(Thread):
|
||||
log = False
|
||||
|
||||
def default_queue(self):
|
||||
ret = []
|
||||
try:
|
||||
r = requests.get('http://{}/mix/?random=True&limit=1'.format(self.api_host)) \
|
||||
.json().get('results')[0].get('slug')
|
||||
r = requests.get('http://{}/mix/{}/stream_url'.format(self.api_host, r))
|
||||
url = r.json()['url']
|
||||
return [
|
||||
ret = [
|
||||
url
|
||||
]
|
||||
except Exception as ex:
|
||||
logging.error(ex)
|
||||
return [
|
||||
ret = [
|
||||
'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):
|
||||
self.audio_queue = queue
|
||||
self._ended = True
|
||||
|
||||
Reference in New Issue
Block a user