def retrieveShowMetadata(self, folder):
        # type: (AnyStr) -> Union[Tuple[int, int, AnyStr], Tuple[None, None, None]]
        """
        Used only when mass adding Existing Shows,
         using previously generated Show metadata to reduce the need to query TVDB.
        """

        from sickbeard.indexers.indexer_config import TVINFO_TVDB

        empty_return = (None, None, None)

        metadata_path = ek.ek(os.path.join, folder, self._show_metadata_filename)

        if not ek.ek(os.path.isdir, folder) or not ek.ek(os.path.isfile, metadata_path):
            logger.log(u"Can't load the metadata file from " + repr(metadata_path) + ", it doesn't exist", logger.DEBUG)
            return empty_return

        logger.log(u"Loading show info from metadata file in " + folder, logger.DEBUG)

        try:
            with ek.ek(io.open, metadata_path, 'r', encoding='utf8') as xmlFileObj:
                showXML = etree.ElementTree(file=xmlFileObj)

            if None is showXML.findtext('title') \
                    or all(None is _f for _f in (showXML.find('//uniqueid[@type]'),
                                                 showXML.findtext('tvdbid'),
                                                 showXML.findtext('id'),
                                                 showXML.findtext('indexer'))):
                logger.log(u"Invalid info in tvshow.nfo (missing name or id):"
                           + str(showXML.findtext('title')) + ' '
                           + str(showXML.findtext('indexer')) + ' '
                           + str(showXML.findtext('tvdbid')) + ' '
                           + str(showXML.findtext('id')))
                return empty_return

            name = showXML.findtext('title')

            try:
                tvid = int(showXML.findtext('indexer'))
            except (BaseException, Exception):
                tvid = None

            # handle v2 format of .nfo file
            default_source = showXML.find('//uniqueid[@default="true"]')
            if None is not default_source:
                use_tvid = default_source.attrib.get('type') or tvid
                if isinstance(use_tvid, string_types):
                    use_tvid = {sickbeard.TVInfoAPI(x).config['slug']: x
                                for x, _ in iteritems(sickbeard.TVInfoAPI().all_sources)}.get(use_tvid)
                prodid = sg_helpers.try_int(default_source.text, None)
                if use_tvid and None is not prodid:
                    return use_tvid, prodid, name

            prodid = showXML.find('//uniqueid[@type="tvdb"]')
            if None is not prodid:
                prodid = int(prodid.text)
                tvid = TVINFO_TVDB
            elif None is not showXML.findtext('tvdbid'):
                prodid = int(showXML.findtext('tvdbid'))
                tvid = TVINFO_TVDB
            elif None is not showXML.findtext('id'):
                prodid = int(showXML.findtext('id'))
                try:
                    tvid = TVINFO_TVDB if [s for s in showXML.findall('.//*')
                                           if s.text and -1 != s.text.find('thetvdb.com')] else tvid
                except (BaseException, Exception):
                    pass
            else:
                logger.log(u"Empty <id> or <tvdbid> field in NFO, unable to find a ID", logger.WARNING)
                return empty_return

            if None is prodid:
                logger.log(u"Invalid Show ID (%s), not using metadata file" % prodid, logger.WARNING)
                return empty_return

        except (BaseException, Exception) as e:
            logger.log(
                u"There was an error parsing your existing metadata file: '" + metadata_path + "' error: " + ex(e),
                logger.WARNING)
            return empty_return

        return tvid, prodid, name