'Used only when mass adding Existing Shows, using previously generated Show metadata to reduce the need to query TVDB.'

def retrieveShowMetadata(self, folder):

    empty_return = (None, None, None)
    assert isinstance(folder, six.text_type)
    metadata_path = ek(os.path.join, folder, self._show_metadata_filename)
    if ((not ek(os.path.isdir, folder)) or (not ek(os.path.isfile, metadata_path))):
        logger.log(((u"Can't    load    the    metadata    file    from    " + metadata_path) + u",    it    doesn't    exist"), logger.DEBUG)
        return empty_return
    logger.log((u'Loading    show    info    from    metadata    file    in    ' + metadata_path), logger.DEBUG)
    try:
        with io.open(metadata_path, u'rb') as xmlFileObj:
            showXML = etree.ElementTree(file=xmlFileObj)
        if ((showXML.findtext(u'title') is None) or ((showXML.findtext(u'tvdbid') is None) and (showXML.findtext(u'id') is None))):
            logger.log(u'Invalid    info    in    tvshow.nfo    (missing    name    or    id):    {0}    {1}    {2}'.format(showXML.findtext(u'title'), showXML.findtext(u'tvdbid'), showXML.findtext(u'id')))
            return empty_return
        name = showXML.findtext(u'title')
        indexer_id_text = (showXML.findtext(u'tvdbid') or showXML.findtext(u'id'))
        if indexer_id_text:
            indexer_id = try_int(indexer_id_text, None)
            if ((indexer_id is None) or (indexer_id < 1)):
                logger.log(((u'Invalid    Indexer    ID    (' + str(indexer_id)) + u'),    not    using    metadata    file'), logger.DEBUG)
                return empty_return
        else:
            logger.log(u'Empty    <id>    or    <tvdbid>    field    in    NFO,    unable    to    find    a    ID,    not    using    metadata    file', logger.DEBUG)
            return empty_return
        indexer = 1
        epg_url_text = showXML.findtext(u'episodeguide/url')
        if epg_url_text:
            epg_url = epg_url_text.lower()
            if ((str(indexer_id) in epg_url) and (u'tvrage' in epg_url)):
                logger.log(((u'Invalid    Indexer    ID    (' + str(indexer_id)) + u'),    not    using    metadata    file    because    it    has    TVRage    info'), logger.WARNING)
                return empty_return
    except Exception as e:
        logger.log((((u"There    was    an    error    parsing    your    existing    metadata    file:    '" + metadata_path) + u"'    error:    ") + ex(e)), logger.WARNING)
        return empty_return
    return (indexer_id, name, indexer)
