(request: WSGIRequest)
return provider.request_radio(request.session.session_key)
Endpoint to request radio for the current song.
Endpoint to request radio for the current song.
Endpoint to request radio for the current song .
def request_radio(request: WSGIRequest) -> HttpResponse:
    """Endpoint to request radio for the current song."""
    try:
        current_song = CurrentSong.objects.get()
    except CurrentSong.DoesNotExist:
        return HttpResponseBadRequest("Need a song to play the radio")
    provider = SongProvider.create(external_url=current_song.external_url)
    return provider.request_radio(request.session.session_key)
def request_radio ( request : WSGIRequest ) -> HttpResponse : try : current_song = CurrentSong . objects . get ( ) except CurrentSong . DoesNotExist : return HttpResponseBadRequest ( "Need a song to play the radio" ) provider = SongProvider . create ( external_url = current_song . external_url ) return provider . request_radio ( request . session . session_key )