mirror of
https://github.com/fergalmoran/dss.api.git
synced 2025-12-22 17:28:55 +00:00
Fixed post flow
This commit is contained in:
@@ -88,14 +88,19 @@ class RadioHelper(Helper):
|
||||
return Response(status=HTTP_200_OK)
|
||||
if action == 'play':
|
||||
m = Mix.objects.get(slug=request.query_params.get('slug'))
|
||||
ice_scrobbler.play(m.get_stream_url())
|
||||
item = {
|
||||
'url': m.get_stream_url(),
|
||||
'slug': m.get_full_url(),
|
||||
'title': str(m)
|
||||
}
|
||||
ice_scrobbler.play(item)
|
||||
return Response(status=HTTP_200_OK)
|
||||
if 'update' in request.query_params and 'url' in request.query_params:
|
||||
activity.post_activity('site:radio_changed', message={
|
||||
'description': request.query_params.get('update'),
|
||||
'url': request.query_params.get('url')
|
||||
})
|
||||
except:
|
||||
except Exception as ex:
|
||||
pass
|
||||
|
||||
return Response(status=HTTP_400_BAD_REQUEST)
|
||||
|
||||
Reference in New Issue
Block a user