'Deletes all episodes releases by show ID and episode ID'

@api.response(200, u'Successfully    deleted    all    releases    for    episode', model=base_message_schema)
@api.doc(description=u'Delete    all    releases    for    a    specific    episode    of    a    specific    show.', parser=release_delete_parser)
def delete(self, show_id, ep_id, session):

    try:
        series.show_by_id(show_id, session=session)
    except NoResultFound:
        raise NotFoundError((u'show    with    ID    %s    not    found' % show_id))
    try:
        episode = series.episode_by_id(ep_id, session)
    except NoResultFound:
        raise NotFoundError((u'episode    with    ID    %s    not    found' % ep_id))
    if (not series.episode_in_show(show_id, ep_id)):
        raise BadRequest((u'episode    with    id    %s    does    not    belong    to    show    %s' % (ep_id, show_id)))
    args = release_delete_parser.parse_args()
    downloaded = ((args.get(u'downloaded') is True) if (args.get(u'downloaded') is not None) else None)
    release_items = []
    for release in episode.releases:
        if ((downloaded and release.downloaded) or ((downloaded is False) and (not release.downloaded)) or (not downloaded)):
            release_items.append(release)
    for release in release_items:
        if args.get(u'forget'):
            fire_event(u'forget', release.title)
        series.delete_release_by_id(release.id)
    return success_response((u'successfully    deleted    all    releases    for    episode    %s    from    show    %s' % (ep_id, show_id)))
