From 2fec443c37f65a8372d8d32e82ce8811a75c3d49 Mon Sep 17 00:00:00 2001 From: echel0n Date: Tue, 15 Jul 2014 03:18:34 -0700 Subject: [PATCH] Forgot to add check if naming pattern was calling nameparser for previous commit. --- sickbeard/name_parser/parser.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/sickbeard/name_parser/parser.py b/sickbeard/name_parser/parser.py index 0f996ca0..dddf9b4a 100644 --- a/sickbeard/name_parser/parser.py +++ b/sickbeard/name_parser/parser.py @@ -236,22 +236,23 @@ class NameParser(object): # scene convert result bestResult = bestResult.convert() if self.convert and not self.naming_pattern else bestResult - if bestResult.show and bestResult.show.is_anime and len(bestResult.ab_episode_numbers): - new_episode_numbers = [] - new_season_numbers = [] + if not self.naming_pattern: + if bestResult.show and bestResult.show.is_anime and len(bestResult.ab_episode_numbers): + new_episode_numbers = [] + new_season_numbers = [] - for epAbsNo in bestResult.ab_episode_numbers: - try: - (s, e) = helpers.get_all_episodes_from_absolute_number(bestResult.show, None, [epAbsNo]) - except exceptions.EpisodeNotFoundByAbsoluteNumberException: - pass - else: - new_episode_numbers.extend(e) - new_season_numbers.append(s) + for epAbsNo in bestResult.ab_episode_numbers: + try: + (s, e) = helpers.get_all_episodes_from_absolute_number(bestResult.show, None, [epAbsNo]) + except exceptions.EpisodeNotFoundByAbsoluteNumberException: + pass + else: + new_episode_numbers.extend(e) + new_season_numbers.append(s) - if len(new_season_numbers) and len(new_episode_numbers): - bestResult.episode_numbers = new_episode_numbers - bestResult.season_number = new_season_numbers[0] + if len(new_season_numbers) and len(new_episode_numbers): + bestResult.episode_numbers = new_episode_numbers + bestResult.season_number = new_season_numbers[0] return bestResult