Example #1
0
def radio_player(slug=None):
    """ Renders out the full player on site """

    _series = None
    if slug:
        try:
            _series = Series.objects.get(url=slug)
        except Series.DoesNotExist:
            pass

    shows = Show.live.all()
    if _series:
        shows = shows.filter(series=_series)
    shows = shows[:SHOWLIST_LIMIT]

    skin = RadioSkin.get_active()
    if _series:
        main_show = Show.get_latest_for_series(_series)
    else:
        main_show = Show.get_latest()

    return {
        'shows': shows,
        'skin': skin,
        'main_show': main_show,
        'MEDIA_URL': settings.MEDIA_URL,
    }
Example #2
0
def player(request):
    skin = RadioSkin.get_active()
    context = {
        'page_title': PAGE_TITLE,
        'player_title': PLAYER_TITLE,
        'skin': skin,
    }
    return render_to_response('radio/container.html', context,
        context_instance=RequestContext(request))