Example #1
0
    def episode_settings(user, url, podcast_url):
        episode = episode_for_podcast_url(podcast_url, url)
        if episode is None:
            raise Http404

        episode_state = episode_state_for_user_episode(user, episode)
        return episode_state, episode_state, udb
Example #2
0
def episode_info(request):
    podcast_url = normalize_feed_url(request.GET.get('podcast', ''))
    episode_url = normalize_feed_url(request.GET.get('url', ''))

    # 404 before we query for url, because query would complain
    # about missing parameters
    if not podcast_url or not episode_url:
        raise Http404

    episode = episode_for_podcast_url(podcast_url, episode_url)

    if episode is None:
        raise Http404

    domain = RequestSite(request).domain

    resp = episode_data(episode, domain)
    return JsonResponse(resp)