'Create a new show and set its first accepted episode and/or alternate names'

@api.response(201, model=show_details_schema)
@api.response(Conflict)
@api.validate(series_input_schema, description=ep_identifier_doc)
def post(self, session):

    data = request.json
    series_name = data.get(u'name')
    normalized_name = series.normalize_series_name(series_name)
    matches = series.shows_by_exact_name(normalized_name, session=session)
    if matches:
        raise Conflict((u'Show    `%s`    already    exist    in    DB' % series_name))
    show = series.Series()
    show.name = series_name
    session.add(show)
    ep_id = data.get(u'begin_episode')
    alt_names = data.get(u'alternate_names')
    if ep_id:
        series.set_series_begin(show, ep_id)
    if alt_names:
        try:
            series.set_alt_names(alt_names, show, session)
        except PluginError as e:
            raise Conflict(e.value)
    session.commit()
    rsp = jsonify(series_details(show, begin=(ep_id is not None)))
    rsp.status_code = 201
    return rsp
