Commit dc965bad authored by echel0n's avatar echel0n

Fixed issue with adding existing shows that have episode filenames that do not...

Fixed issue with adding existing shows that have episode filenames that do not contain the show name.
parent a73aa968
......@@ -373,8 +373,7 @@ class NameParser(object):
best_result.season_number = new_season_numbers[0]
if show_obj.is_scene and not skip_scene_detection:
sickrage.app.log.debug(
"Scene converted parsed result {} into {}".format(best_result.original_name, best_result))
sickrage.app.log.debug("Scene converted parsed result {} into {}".format(best_result.original_name, best_result))
# CPU sleep
time.sleep(0.02)
......@@ -495,8 +494,9 @@ class NameParser(object):
final_result.indexer_id = self._combine_results(file_name_result, dir_name_result, 'indexer_id')
final_result.quality = self._combine_results(file_name_result, dir_name_result, 'quality')
if self.validate_show and not self.naming_pattern and not final_result.indexer_id:
raise InvalidShowException("Unable to match {} to a show in your database. Parser result: {}".format(name, final_result))
if self.validate_show:
if not self.naming_pattern and not final_result.indexer_id:
raise InvalidShowException("Unable to match {} to a show in your database. Parser result: {}".format(name, final_result))
# if there's no useful info in it then raise an exception
if final_result.season_number is None and not final_result.episode_numbers and final_result.air_date is None and not final_result.ab_episode_numbers and not final_result.series_name:
......
......@@ -551,7 +551,7 @@ class TVShow(MainDBBase):
sickrage.app.log.debug(str(self.indexer_id) + ": Creating episode object from " + filename)
try:
parse_result = NameParser(show_id=self.indexer_id).parse(filename, skip_scene_detection=True)
parse_result = NameParser(validate_show=False).parse(filename, skip_scene_detection=True)
except InvalidNameException:
sickrage.app.log.debug("Unable to parse the filename " + filename + " into a valid episode")
return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment