import copy


def _convert_trakt_episode_metadata(show_metadata, episode, banners=True):
    """
    converts trakt episode metadata to format suited for kodiswift
    Args:
        show_metadata: dictionary of trakt tv show metadata
        episode: dictionary of trakt episode metadata
        banners: whether to get the poster image from metadata (not functional yet)
    Returns:
        episode metadata
    """
    info = copy.deepcopy(show_metadata)
    info['episode'] = episode.get('number')
    info['title'] = episode.get('title', '')
    info['aired'] = episode.get('first_aired', '')
    info['premiered'] = episode.get('first_aired', '')
    info['rating'] = episode.get('rating', '')
    info['plot'] = episode.get('overview', '')
    info['plotoutline'] = episode.get('overview', '')
    info['votes'] = episode.get('votes', '')
    if banners:
        info['poster'] = ""
    return info