1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-16 06:15:09 -05:00

Updated sports regex pattern for more accurate matches and to filter out pre-event episodes

This commit is contained in:
echel0n 2014-08-22 23:10:31 -07:00
parent 7de9d96340
commit dbb3b75d6e
2 changed files with 5 additions and 10 deletions

View File

@ -124,9 +124,6 @@ class NameParser(object):
if 'series_num' in named_groups and match.group('series_num'): if 'series_num' in named_groups and match.group('series_num'):
result.score += 1 result.score += 1
if 'series_event' in named_groups and match.group('series_event'):
result.score += 1
if 'season_num' in named_groups: if 'season_num' in named_groups:
tmp_season = int(match.group('season_num')) tmp_season = int(match.group('season_num'))
if cur_regex_name == 'bare' and tmp_season in (19, 20): if cur_regex_name == 'bare' and tmp_season in (19, 20):

View File

@ -99,13 +99,11 @@ normal_regexes = [
# Show.Name.2010.11.23.Source.Quality.Etc-Group # Show.Name.2010.11.23.Source.Quality.Etc-Group
# Show Name - 2010-11-23 - Ep Name # Show Name - 2010-11-23 - Ep Name
''' '''
^(?P<series_name>(UEFA|MLB|ESPN|WWE|MMA|UFC|TNA|EPL|NASCAR|NBA|NFL|NHL|NRL|PGA|SUPER LEAGUE|FORMULA|FIFA|NETBALL|MOTOGP))[. _-]+ ^(?P<series_name>.*?(UEFA|MLB|ESPN|WWE|MMA|UFC|TNA|EPL|NASCAR|NBA|NFL|NHL|NRL|PGA|SUPER LEAGUE|FORMULA|FIFA|NETBALL|MOTOGP).*?)[. _-]+
((?P<series_num>\d+)[. _-]+)? # Show_Number and seperator ((?P<series_num>\d{1,3}).*?)?
((?P<series_event>.+?)[. _-]+)? # Show_Event and seperator (?P<air_date>(\d{2}[. _-]+\d{2}[. _-]+\d{2})|(\d{4}[. _-]+\d{1,2}[. _-]+\d{1,2})|(\d{1,2}\w{2}[. _-]+\w+[. _-]+\d{4})|(\w+[. _-]+\d{1,2}\w{2}[. _-]+\d{4}))[. _-]*
(?P<air_date>(\d{4}[. _-]+\d{1,2}[. _-]+\d{1,2})|(\d{1,2}\w{2}[. _-]+\w+[. _-]+\d{4})|(\w+[. _-]+\d{1,2}\w{2}[. _-]+\d{4})) ((?P<extra_info>.+?)((?<![. _-])
[. _-]*((?P<extra_info>.+?) # Source_Quality_Etc- (?<!WEB)-(?P<release_group>[^- ]+([. _-]\[.*\])?))?)?$
((?<![. _-])(?<!WEB) # Make sure this is really the release group
-(?P<release_group>[^- ]+([. _-]\[.*\])?))?)?$ # Group
'''), '''),
('stupid', ('stupid',