diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index d56d755e..e42573b1 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -2876,18 +2876,19 @@ class NewHomeAddShows(MainHandler): indexer_id = show_name = indexer = None for cur_provider in sickbeard.metadata_provider_dict.values(): - (indexer_id, show_name, indexer) = cur_provider.retrieveShowMetadata(cur_path) + if not (indexer_id and show_name): + (indexer_id, show_name, indexer) = cur_provider.retrieveShowMetadata(cur_path) - # default to TVDB if indexer was not detected - if show_name and not (indexer or indexer_id): - (sn, idx, id) = helpers.searchIndexerForShowID(show_name, indexer, indexer_id) + # default to TVDB if indexer was not detected + if show_name and not (indexer or indexer_id): + (sn, idx, id) = helpers.searchIndexerForShowID(show_name, indexer, indexer_id) - # set indexer and indexer_id from found info - if not indexer and idx: - indexer = idx + # set indexer and indexer_id from found info + if not indexer and idx: + indexer = idx - if not indexer_id and id: - indexer_id = id + if not indexer_id and id: + indexer_id = id cur_dir['existing_info'] = (indexer_id, show_name, indexer) @@ -2921,7 +2922,7 @@ class NewHomeAddShows(MainHandler): if not show_dir: t.default_show_name = '' elif not show_name: - t.default_show_name = ek.ek(os.path.basename, ek.ek(os.path.normpath, show_dir)).replace('.', ' ') + t.default_show_name = re.sub(' \(\d{4}\)','', ek.ek(os.path.basename, ek.ek(os.path.normpath, show_dir)).replace('.', ' ')) else: t.default_show_name = show_name