1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Fix for No episode number found error for air-by-date/sports shows

This commit is contained in:
echel0n 2014-08-22 08:26:41 -07:00
parent ca4fe51b97
commit 0fddbac1c4

View File

@ -179,7 +179,6 @@ class NameParser(object):
else: else:
result.version = -1 result.version = -1
matches.append(result) matches.append(result)
if len(matches): if len(matches):
@ -218,6 +217,9 @@ class NameParser(object):
"SELECT season, episode FROM tv_episodes WHERE showid = ? and indexer = ? and airdate = ?", "SELECT season, episode FROM tv_episodes WHERE showid = ? and indexer = ? and airdate = ?",
[bestResult.show.indexerid, bestResult.show.indexer, airdate]) [bestResult.show.indexerid, bestResult.show.indexer, airdate])
season_number = None
episode_numbers = []
if sql_result: if sql_result:
season_number = int(sql_result[0][0]) season_number = int(sql_result[0][0])
episode_numbers = [int(sql_result[0][1])] episode_numbers = [int(sql_result[0][1])]
@ -422,9 +424,9 @@ class NameParser(object):
# anime absolute numbers # anime absolute numbers
final_result.ab_episode_numbers = self._combine_results(file_name_result, dir_name_result, 'ab_episode_numbers') final_result.ab_episode_numbers = self._combine_results(file_name_result, dir_name_result, 'ab_episode_numbers')
if not final_result.air_date: # season and episode numbers
final_result.season_number = self._combine_results(file_name_result, dir_name_result, 'season_number') final_result.season_number = self._combine_results(file_name_result, dir_name_result, 'season_number')
final_result.episode_numbers = self._combine_results(file_name_result, dir_name_result, 'episode_numbers') final_result.episode_numbers = self._combine_results(file_name_result, dir_name_result, 'episode_numbers')
# if the dirname has a release group/show name I believe it over the filename # if the dirname has a release group/show name I believe it over the filename
final_result.series_name = self._combine_results(dir_name_result, file_name_result, 'series_name') final_result.series_name = self._combine_results(dir_name_result, file_name_result, 'series_name')