mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 05:33:37 +00:00
Change garbage_name regex.
This commit is contained in:
parent
ee04580da3
commit
6f84d1fee6
3 changed files with 206 additions and 199 deletions
|
@ -1,4 +1,9 @@
|
||||||
### 0.16.14 (2018-06-01 15:55:00 UTC)
|
### 0.16.15 (2018-06-03 21:24:00 UTC)
|
||||||
|
|
||||||
|
* Change garbage_name regex
|
||||||
|
|
||||||
|
|
||||||
|
### 0.16.14 (2018-06-01 15:55:00 UTC)
|
||||||
|
|
||||||
* Change improve IPT and RarBG providers
|
* Change improve IPT and RarBG providers
|
||||||
|
|
||||||
|
|
|
@ -73,10 +73,12 @@ class NameParser(object):
|
||||||
|
|
||||||
cls.compiled_regexes = {0: [], 1: []}
|
cls.compiled_regexes = {0: [], 1: []}
|
||||||
index = 0
|
index = 0
|
||||||
|
strip_comment = re.compile('\(\?#[^)]+\)')
|
||||||
for regexItem in uncompiled_regex:
|
for regexItem in uncompiled_regex:
|
||||||
for cur_pattern_num, (cur_pattern_name, cur_pattern) in enumerate(regexItem):
|
for cur_pattern_num, (cur_pattern_name, cur_pattern) in enumerate(regexItem):
|
||||||
try:
|
try:
|
||||||
cur_regex = re.compile(cur_pattern, re.VERBOSE | re.IGNORECASE)
|
cur_pattern = strip_comment.sub('', cur_pattern)
|
||||||
|
cur_regex = re.compile('(?x)' + cur_pattern, re.VERBOSE | re.IGNORECASE)
|
||||||
except re.error as errormsg:
|
except re.error as errormsg:
|
||||||
logger.log(u'WARNING: Invalid episode_pattern, %s. %s' % (errormsg, cur_pattern))
|
logger.log(u'WARNING: Invalid episode_pattern, %s. %s' % (errormsg, cur_pattern))
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -21,21 +21,21 @@
|
||||||
normal_regexes = [
|
normal_regexes = [
|
||||||
('garbage_name',
|
('garbage_name',
|
||||||
'''
|
'''
|
||||||
^[a-zA-Z0-9]{3,}$
|
^(?!\\bs?\\d+[ex]\\d+\\b)[a-zA-Z0-9]{3,}$
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
('standard_repeat',
|
('standard_repeat',
|
||||||
# Show.Name.S01E02.S01E03.Source.Quality.Etc-Group
|
# Show.Name.S01E02.S01E03.Source.Quality.Etc-Group
|
||||||
# Show Name - S01E02 - S01E03 - S01E04 - Ep Name
|
# Show Name - S01E02 - S01E03 - S01E04 - Ep Name
|
||||||
'''
|
'''
|
||||||
^(?P<series_name>.+?)[. _-]+ # Show_Name and separator
|
^(?P<series_name>.+?)[. _-]+ (?# Show_Name and separator)
|
||||||
s(?P<season_num>\d+)[. _-]* # S01 and optional separator
|
s(?P<season_num>\d+)[. _-]* (?# S01 and optional separator)
|
||||||
e(?P<ep_num>\d+) # E02 and separator
|
e(?P<ep_num>\d+) (?# E02 and separator)
|
||||||
([. _-]+s(?P=season_num)[. _-]* # S01 and optional separator
|
([. _-]+s(?P=season_num)[. _-]* (?# S01 and optional separator)
|
||||||
e(?P<extra_ep_num>\d+))+ # E03/etc and separator
|
e(?P<extra_ep_num>\d+))+ (?# E03/etc and separator)
|
||||||
[. _-]*((?P<extra_info>.+?) # Source_Quality_Etc-
|
[. _-]*((?P<extra_info>.+?) (?# Source_Quality_Etc-)
|
||||||
((?<![. _-])(?<!WEB) # Make sure this is really the release group
|
((?<![. _-])(?<!WEB) (?# Make sure this is really the release group)
|
||||||
-(?P<release_group>[^- ]+))?)?$ # Group
|
-(?P<release_group>[^- ]+))?)?$ (?# Group)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -43,14 +43,14 @@ normal_regexes = [
|
||||||
# Show.Name.1x02.1x03.Source.Quality.Etc-Group
|
# Show.Name.1x02.1x03.Source.Quality.Etc-Group
|
||||||
# Show Name - 1x02 - 1x03 - 1x04 - Ep Name
|
# Show Name - 1x02 - 1x03 - 1x04 - Ep Name
|
||||||
'''
|
'''
|
||||||
^(?P<series_name>.+?)[. _-]+ # Show_Name and separator
|
^(?P<series_name>.+?)[. _-]+ (?# Show_Name and separator)
|
||||||
(?P<season_num>\d+)x # 1x
|
(?P<season_num>\d+)x (?# 1x)
|
||||||
(?P<ep_num>\d+) # 02 and separator
|
(?P<ep_num>\d+) (?# 02 and separator)
|
||||||
([. _-]+(?P=season_num)x # 1x
|
([. _-]+(?P=season_num)x (?# 1x)
|
||||||
(?P<extra_ep_num>\d+))+ # 03/etc and separator
|
(?P<extra_ep_num>\d+))+ (?# 03/etc and separator)
|
||||||
[. _-]*((?P<extra_info>.+?) # Source_Quality_Etc-
|
[. _-]*((?P<extra_info>.+?) (?# Source_Quality_Etc-)
|
||||||
((?<![. _-])(?<!WEB) # Make sure this is really the release group
|
((?<![. _-])(?<!WEB) (?# Make sure this is really the release group)
|
||||||
-(?P<release_group>[^- ]+))?)?$ # Group
|
-(?P<release_group>[^- ]+))?)?$ (?# Group)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -58,14 +58,14 @@ normal_regexes = [
|
||||||
# Show Name - S01E02&03 - My Ep Name
|
# Show Name - S01E02&03 - My Ep Name
|
||||||
# Show Name - S01E02and03 - My Ep Name
|
# Show Name - S01E02and03 - My Ep Name
|
||||||
'''
|
'''
|
||||||
^((?P<series_name>.+?)[. _-]+)? # Show_Name and separator
|
^((?P<series_name>.+?)[. _-]+)? (?# Show_Name and separator)
|
||||||
s(?P<season_num>\d+)[. _-]* # S01 and optional separator
|
s(?P<season_num>\d+)[. _-]* (?# S01 and optional separator)
|
||||||
e(?P<ep_num>\d+) # E02 and separator
|
e(?P<ep_num>\d+) (?# E02 and separator)
|
||||||
(([. _-]*and|&|to) # linking and/&/to
|
(([. _-]*and|&|to) (?# linking and/&/to)
|
||||||
(?P<extra_ep_num>(?!(2160|1080|720|480)[pi])\d+))+ # additional E03/etc
|
(?P<extra_ep_num>(?!(2160|1080|720|480)[pi])\d+))+ (?# additional E03/etc)
|
||||||
[. _-]*((?P<extra_info>.+?) # Source_Quality_Etc-
|
[. _-]*((?P<extra_info>.+?) (?# Source_Quality_Etc-)
|
||||||
((?<![. _-])(?<!WEB) # Make sure this is really the release group
|
((?<![. _-])(?<!WEB) (?# Make sure this is really the release group)
|
||||||
-(?P<release_group>[^- ]+))?)?$ # Group
|
-(?P<release_group>[^- ]+))?)?$ (?# Group)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -77,30 +77,30 @@ normal_regexes = [
|
||||||
# Show Name - S01E02-03 - My Ep Name
|
# Show Name - S01E02-03 - My Ep Name
|
||||||
# Show.Name.S01.E02.E03
|
# Show.Name.S01.E02.E03
|
||||||
'''
|
'''
|
||||||
^((?P<series_name>.+?)[. _-]+)? # Show_Name and separator
|
^((?P<series_name>.+?)[. _-]+)? (?# Show_Name and separator)
|
||||||
s(?P<season_num>\d+)[. _-]* # S01 and optional separator
|
s(?P<season_num>\d+)[. _-]* (?# S01 and optional separator)
|
||||||
e(?P<ep_num>\d+) # E02 and separator
|
e(?P<ep_num>\d+) (?# E02 and separator)
|
||||||
(([. _-]*e|-) # linking e/- char
|
(([. _-]*e|-) (?# linking e/- char)
|
||||||
(?P<extra_ep_num>(?!(2160|1080|720|480)[pi])\d+))* # additional E03/etc
|
(?P<extra_ep_num>(?!(2160|1080|720|480)[pi])\d+))* (?# additional E03/etc)
|
||||||
[. _-]*((?P<extra_info>.+?) # Source_Quality_Etc-
|
[. _-]*((?P<extra_info>.+?) (?# Source_Quality_Etc-)
|
||||||
((?<![. _-])(?<!WEB) # Make sure this is really the release group
|
((?<![. _-])(?<!WEB) (?# Make sure this is really the release group)
|
||||||
-(?P<release_group>[^- ]+))?)?$ # Group
|
-(?P<release_group>[^- ]+))?)?$ (?# Group)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
('fov_non_standard_multi_ep',
|
('fov_non_standard_multi_ep',
|
||||||
# Show Name - 1x02and03and04 - My Ep Name
|
# Show Name - 1x02and03and04 - My Ep Name
|
||||||
'''
|
'''
|
||||||
^((?P<series_name>.+?)[\[. _-]+)? # Show_Name and separator
|
^((?P<series_name>.+?)[\[. _-]+)? (?# Show_Name and separator)
|
||||||
(?P<season_num>\d+)x # 1x
|
(?P<season_num>\d+)x (?# 1x)
|
||||||
(?P<ep_num>\d+) # 02 and separator
|
(?P<ep_num>\d+) (?# 02 and separator)
|
||||||
(([. _-]*and|&|to) # linking x/- char
|
(([. _-]*and|&|to) (?# linking x/- char)
|
||||||
(?P<extra_ep_num>
|
(?P<extra_ep_num>
|
||||||
(?!(2160|1080|720|480)[pi])(?!(?<=x)264) # ignore obviously wrong multi-eps
|
(?!(2160|1080|720|480)[pi])(?!(?<=x)264) (?# ignore obviously wrong multi-eps)
|
||||||
\d+))+ # additional x03/etc
|
\d+))+ (?# additional x03/etc)
|
||||||
[\]. _-]*((?P<extra_info>.+?) # Source_Quality_Etc-
|
[\]. _-]*((?P<extra_info>.+?) (?# Source_Quality_Etc-)
|
||||||
((?<![. _-])(?<!WEB) # Make sure this is really the release group
|
((?<![. _-])(?<!WEB) (?# Make sure this is really the release group)
|
||||||
-(?P<release_group>[^- ]+))?)?$ # Group
|
-(?P<release_group>[^- ]+))?)?$ (?# Group)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -110,16 +110,16 @@ normal_regexes = [
|
||||||
# Show_Name.1x02x03x04.Source_Quality_Etc-Group
|
# Show_Name.1x02x03x04.Source_Quality_Etc-Group
|
||||||
# Show Name - 1x02-03-04 - My Ep Name
|
# Show Name - 1x02-03-04 - My Ep Name
|
||||||
'''
|
'''
|
||||||
^((?P<series_name>.+?)[\[. _-]+)? # Show_Name and separator
|
^((?P<series_name>.+?)[\[. _-]+)? (?# Show_Name and separator)
|
||||||
(?P<season_num>\d+)x # 1x
|
(?P<season_num>\d+)x (?# 1x)
|
||||||
(?P<ep_num>\d+) # 02 and separator
|
(?P<ep_num>\d+) (?# 02 and separator)
|
||||||
(([. _-]*x|-) # linking x/- char
|
(([. _-]*x|-) (?# linking x/- char)
|
||||||
(?P<extra_ep_num>
|
(?P<extra_ep_num>
|
||||||
(?!(2160|1080|720|480)[pi])(?!(?<=x)264) # ignore obviously wrong multi-eps
|
(?!(2160|1080|720|480)[pi])(?!(?<=x)264) (?# ignore obviously wrong multi-eps)
|
||||||
\d+))* # additional x03/etc
|
\d+))* (?# additional x03/etc)
|
||||||
[\]. _-]*((?P<extra_info>.+?) # Source_Quality_Etc-
|
[\]. _-]*((?P<extra_info>.+?) (?# Source_Quality_Etc-)
|
||||||
((?<![. _-])(?<!WEB) # Make sure this is really the release group
|
((?<![. _-])(?<!WEB) (?# Make sure this is really the release group)
|
||||||
-(?P<release_group>[^- ]+))?)?$ # Group
|
-(?P<release_group>[^- ]+))?)?$ (?# Group)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -127,13 +127,13 @@ 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>.+?)[. _-]+)? # Show_Name and separator
|
^((?P<series_name>.+?)[. _-]+)? (?# Show_Name and separator)
|
||||||
(?P<air_year>\d{4})[. _-]+ # 2010 and separator
|
(?P<air_year>\d{4})[. _-]+ (?# 2010 and separator)
|
||||||
(?P<air_month>\d{2})[. _-]+ # 11 and separator
|
(?P<air_month>\d{2})[. _-]+ (?# 11 and separator)
|
||||||
(?P<air_day>\d{2}) # 23 and separator
|
(?P<air_day>\d{2}) (?# 23 and separator)
|
||||||
[. _-]*((?P<extra_info>.+?) # Source_Quality_Etc-
|
[. _-]*((?P<extra_info>.+?) (?# Source_Quality_Etc-)
|
||||||
((?<![. _-])(?<!WEB) # Make sure this is really the release group
|
((?<![. _-])(?<!WEB) (?# Make sure this is really the release group)
|
||||||
-(?P<release_group>[^- ]+))?)?$ # Group
|
-(?P<release_group>[^- ]+))?)?$ (?# Group)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -143,47 +143,47 @@ normal_regexes = [
|
||||||
# Show Name - 14-08-17 - Ep Name
|
# Show Name - 14-08-17 - Ep Name
|
||||||
# Show Name - 14 Jan 17 - Ep Name
|
# Show Name - 14 Jan 17 - Ep Name
|
||||||
'''
|
'''
|
||||||
^((?P<series_name>.+?)[. _-]+)? # Show_Name and separator
|
^((?P<series_name>.+?)[. _-]+)? (?# Show_Name and separator)
|
||||||
\(?(?P<air_day>\d{2})[. _-]+ # 23 and separator
|
\(?(?P<air_day>\d{2})[. _-]+ (?# 23 and separator)
|
||||||
(?P<air_month>(?:\d{2}|(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\w*))[. _-]+ # 11 and separator
|
(?P<air_month>(?:\d{2}|(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\w*))[. _-]+ (?# 11 and separator)
|
||||||
(?P<air_year>(?:19|20)?\d{2})\)? # 2010 and separator
|
(?P<air_year>(?:19|20)?\d{2})\)? (?# 2010 and separator)
|
||||||
[. _-]*((?P<extra_info>.+?) # Source_Quality_Etc-
|
[. _-]*((?P<extra_info>.+?) (?# Source_Quality_Etc-)
|
||||||
((?<![. _-])(?<!WEB) # Make sure this is really the release group
|
((?<![. _-])(?<!WEB) (?# Make sure this is really the release group)
|
||||||
-(?P<release_group>[^- ]+))?)?$ # Group
|
-(?P<release_group>[^- ]+))?)?$ (?# Group)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
('stupid',
|
('stupid',
|
||||||
# tpz-abc102
|
# tpz-abc102
|
||||||
'''
|
'''
|
||||||
(?P<release_group>.+?)-\w+?[\. ]? # tpz-abc
|
(?P<release_group>.+?)-\w+?[\. ]? (?# tpz-abc)
|
||||||
(?!264) # don't count x264
|
(?!264) (?# don't count x264)
|
||||||
(?P<season_num>\d{1,2}) # 1
|
(?P<season_num>\d{1,2}) (?# 1)
|
||||||
(?P<ep_num>\d{2})$ # 02
|
(?P<ep_num>\d{2})$ (?# 02)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
('verbose',
|
('verbose',
|
||||||
# Show Name Season 1 Episode 2 Ep Name
|
# Show Name Season 1 Episode 2 Ep Name
|
||||||
'''
|
'''
|
||||||
^(?P<series_name>.+?)[. _-]+ # Show Name and separator
|
^(?P<series_name>.+?)[. _-]+ (?# Show Name and separator)
|
||||||
season[. _-]+ # season and separator
|
season[. _-]+ (?# season and separator)
|
||||||
(?P<season_num>\d+)[. _-]+ # 1
|
(?P<season_num>\d+)[. _-]+ (?# 1)
|
||||||
episode[. _-]+ # episode and separator
|
episode[. _-]+ (?# episode and separator)
|
||||||
(?P<ep_num>\d+)[. _-]+ # 02 and separator
|
(?P<ep_num>\d+)[. _-]+ (?# 02 and separator)
|
||||||
(?P<extra_info>.+)$ # Source_Quality_Etc-
|
(?P<extra_info>.+)$ (?# Source_Quality_Etc-)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
('season_only',
|
('season_only',
|
||||||
# Show.Name.S01.Source.Quality.Etc-Group
|
# Show.Name.S01.Source.Quality.Etc-Group
|
||||||
'''
|
'''
|
||||||
^((?P<series_name>.+?)[. _-]+)? # Show_Name and separator
|
^((?P<series_name>.+?)[. _-]+)? (?# Show_Name and separator)
|
||||||
s(eason[. _-])? # S01/Season 01
|
s(eason[. _-])? (?# S01/Season 01)
|
||||||
(?P<season_num>\d+)[. _-]* # S01 and optional separator
|
(?P<season_num>\d+)[. _-]* (?# S01 and optional separator)
|
||||||
[. _-]*((?P<extra_info>.+?) # Source_Quality_Etc-
|
[. _-]*((?P<extra_info>.+?) (?# Source_Quality_Etc-)
|
||||||
((?<![. _-])(?<!WEB) # Make sure this is really the release group
|
((?<![. _-])(?<!WEB) (?# Make sure this is really the release group)
|
||||||
-(?P<release_group>[^- ]+))?)?$ # Group
|
-(?P<release_group>[^- ]+))?)?$ (?# Group)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -191,14 +191,14 @@ normal_regexes = [
|
||||||
# Show.Name.E02-03
|
# Show.Name.E02-03
|
||||||
# Show.Name.E02.2010
|
# Show.Name.E02.2010
|
||||||
'''
|
'''
|
||||||
^((?P<series_name>.+?)[. _-]+)? # Show_Name and separator
|
^((?P<series_name>.+?)[. _-]+)? (?# Show_Name and separator)
|
||||||
(e(p(isode)?)?|part|pt)[. _-]? # e, ep, episode, or part
|
(e(p(isode)?)?|part|pt)[. _-]? (?# e, ep, episode, or part)
|
||||||
(?P<ep_num>(\d+|[ivx]+)) # first ep num
|
(?P<ep_num>(\d+|[ivx]+)) (?# first ep num)
|
||||||
((([. _-]+(and|&|to)[. _-]+)|-) # and/&/to joiner
|
((([. _-]+(and|&|to)[. _-]+)|-) (?# and/&/to joiner)
|
||||||
(?P<extra_ep_num>(?!(2160|1080|720|480)[pi])(\d+|[ivx]+))[. _-]) # second ep num
|
(?P<extra_ep_num>(?!(2160|1080|720|480)[pi])(\d+|[ivx]+))[. _-]) (?# second ep num)
|
||||||
([. _-]*(?P<extra_info>.+?) # Source_Quality_Etc-
|
([. _-]*(?P<extra_info>.+?) (?# Source_Quality_Etc-)
|
||||||
((?<![. _-])(?<!WEB) # Make sure this is really the release group
|
((?<![. _-])(?<!WEB) (?# Make sure this is really the release group)
|
||||||
-(?P<release_group>[^- ]+))?)?$ # Group
|
-(?P<release_group>[^- ]+))?)?$ (?# Group)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -207,27 +207,27 @@ normal_regexes = [
|
||||||
# Show.Name.Part.3.Source.Quality.Etc-Group
|
# Show.Name.Part.3.Source.Quality.Etc-Group
|
||||||
# Show.Name.Part.1.and.Part.2.Blah-Group
|
# Show.Name.Part.1.and.Part.2.Blah-Group
|
||||||
'''
|
'''
|
||||||
^((?P<series_name>.+?)[. _-]+)? # Show_Name and separator
|
^((?P<series_name>.+?)[. _-]+)? (?# Show_Name and separator)
|
||||||
(e(p(isode)?)?|part|pt)[. _-]? # e, ep, episode, or part
|
(e(p(isode)?)?|part|pt)[. _-]? (?# e, ep, episode, or part)
|
||||||
(?P<ep_num>(\d+|([ivx]+(?=[. _-])))) # first ep num
|
(?P<ep_num>(\d+|([ivx]+(?=[. _-])))) (?# first ep num)
|
||||||
([. _-]+((and|&|to)[. _-]+)? # and/&/to joiner
|
([. _-]+((and|&|to)[. _-]+)? (?# and/&/to joiner)
|
||||||
((e(p(isode)?)?|part|pt)[. _-]?) # e, ep, episode, or part
|
((e(p(isode)?)?|part|pt)[. _-]?) (?# e, ep, episode, or part)
|
||||||
(?P<extra_ep_num>(?!(2160|1080|720|480)[pi])
|
(?P<extra_ep_num>(?!(2160|1080|720|480)[pi])
|
||||||
(\d+|([ivx]+(?=[. _-]))))[. _-])* # second ep num
|
(\d+|([ivx]+(?=[. _-]))))[. _-])* (?# second ep num)
|
||||||
([. _-]*(?P<extra_info>.+?) # Source_Quality_Etc-
|
([. _-]*(?P<extra_info>.+?) (?# Source_Quality_Etc-)
|
||||||
((?<![. _-])(?<!WEB) # Make sure this is really the release group
|
((?<![. _-])(?<!WEB) (?# Make sure this is really the release group)
|
||||||
-(?P<release_group>[^- ]+))?)?$ # Group
|
-(?P<release_group>[^- ]+))?)?$ (?# Group)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
('bare',
|
('bare',
|
||||||
# Show.Name.102.Source.Quality.Etc-Group
|
# Show.Name.102.Source.Quality.Etc-Group
|
||||||
'''
|
'''
|
||||||
^(?P<series_name>.+?)[. _-]+ # Show_Name and separator
|
^(?P<series_name>.+?)[. _-]+ (?# Show_Name and separator)
|
||||||
(?P<season_num>\d{1,2}) # 1
|
(?P<season_num>\d{1,2}) (?# 1)
|
||||||
(?P<ep_num>\d{2}) # 02 and separator
|
(?P<ep_num>\d{2}) (?# 02 and separator)
|
||||||
([. _-]+(?P<extra_info>(?!\d{3}[. _-]+)[^-]+) # Source_Quality_Etc-
|
([. _-]+(?P<extra_info>(?!\d{3}[. _-]+)[^-]+) (?# Source_Quality_Etc-)
|
||||||
(-(?P<release_group>.+))?)?$ # Group
|
(-(?P<release_group>.+))?)?$ (?# Group)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -235,13 +235,13 @@ normal_regexes = [
|
||||||
# Show Name - 01 - Ep Name
|
# Show Name - 01 - Ep Name
|
||||||
# 01 - Ep Name
|
# 01 - Ep Name
|
||||||
'''
|
'''
|
||||||
^((?P<series_name>.+?)(?:[. _-]{2,}|[. _]))? # Show_Name and separator
|
^((?P<series_name>.+?)(?:[. _-]{2,}|[. _]))? (?# Show_Name and separator)
|
||||||
(?P<ep_num>\d{1,3}(?!\d)) # 01
|
(?P<ep_num>\d{1,3}(?!\d)) (?# 01)
|
||||||
(?:-(?P<extra_ep_num>\d{1,3}(?!\d)))* # 02
|
(?:-(?P<extra_ep_num>\d{1,3}(?!\d)))* (?# 02)
|
||||||
(\s*(?:of)?\s*\d{1,3})? # of num eps
|
(\s*(?:of)?\s*\d{1,3})? (?# of num eps)
|
||||||
[. _-]+((?P<extra_info>.+?) # Source_Quality_Etc-
|
[. _-]+((?P<extra_info>.+?) (?# Source_Quality_Etc-)
|
||||||
((?<![. _-])(?<!WEB) # Make sure this is really the release group
|
((?<![. _-])(?<!WEB) (?# Make sure this is really the release group)
|
||||||
-(?P<release_group>[^- ]+))?)?$ # Group
|
-(?P<release_group>[^- ]+))?)?$ (?# Group)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
@ -269,14 +269,14 @@ anime_regexes = [
|
||||||
# [Group Name] Show Name - 13
|
# [Group Name] Show Name - 13
|
||||||
# Show Name 13
|
# Show Name 13
|
||||||
'''
|
'''
|
||||||
^(\[(?P<release_group>.+?)\][ ._-]*)? # Release Group and separator
|
^(\[(?P<release_group>.+?)\][ ._-]*)? (?# Release Group and separator)
|
||||||
(?P<series_name>.+?)[ ._-]+ # Show_Name and separator
|
(?P<series_name>.+?)[ ._-]+ (?# Show_Name and separator)
|
||||||
(?P<ep_ab_num>\d{1,3}) # E01
|
(?P<ep_ab_num>\d{1,3}) (?# E01)
|
||||||
(-(?P<extra_ab_ep_num>\d{1,3}))? # E02
|
(-(?P<extra_ab_ep_num>\d{1,3}))? (?# E02)
|
||||||
(v(?P<version>[0-9]))? # version
|
(v(?P<version>[0-9]))? (?# version)
|
||||||
[ ._-]+\[(?P<extra_info>\d{3,4}[xp]?\d{0,4}.+?)\] # Source_Quality_Etc-
|
[ ._-]+\[(?P<extra_info>\d{3,4}[xp]?\d{0,4}.+?)\] (?# Source_Quality_Etc-)
|
||||||
(\[(?P<crc>\w{8})\])? # CRC
|
(\[(?P<crc>\w{8})\])? (?# CRC)
|
||||||
.*? # Separator and EOL
|
.*? (?# Separator and EOL)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -284,28 +284,28 @@ anime_regexes = [
|
||||||
# [Stratos-Subs]_Infinite_Stratos_-_12_(1280x720_H.264_AAC)_[379759DB]
|
# [Stratos-Subs]_Infinite_Stratos_-_12_(1280x720_H.264_AAC)_[379759DB]
|
||||||
# [ShinBunBu-Subs] Bleach - 02-03 (CX 1280x720 x264 AAC)
|
# [ShinBunBu-Subs] Bleach - 02-03 (CX 1280x720 x264 AAC)
|
||||||
'''
|
'''
|
||||||
^(\[(?P<release_group>.+?)\][ ._-]*)? # Release Group and separator
|
^(\[(?P<release_group>.+?)\][ ._-]*)? (?# Release Group and separator)
|
||||||
(?P<series_name>.+?)[ ._-]+ # Show_Name and separator
|
(?P<series_name>.+?)[ ._-]+ (?# Show_Name and separator)
|
||||||
(?P<ep_ab_num>\d{1,3}) # E01
|
(?P<ep_ab_num>\d{1,3}) (?# E01)
|
||||||
(-(?P<extra_ab_ep_num>\d{1,3}))? # E02
|
(-(?P<extra_ab_ep_num>\d{1,3}))? (?# E02)
|
||||||
(v(?P<version>[0-9]))? # version
|
(v(?P<version>[0-9]))? (?# version)
|
||||||
[ ._-]+\((?P<extra_info>(CX[ ._-]?)?\d{3,4}[xp]?\d{0,4}[\.\w\s-]*)\) # Source_Quality_Etc-
|
[ ._-]+\((?P<extra_info>(CX[ ._-]?)?\d{3,4}[xp]?\d{0,4}[\.\w\s-]*)\) (?# Source_Quality_Etc-)
|
||||||
(\[(?P<crc>\w{8})\])? # CRC
|
(\[(?P<crc>\w{8})\])? (?# CRC)
|
||||||
.*? # Separator and EOL
|
.*? (?# Separator and EOL)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
('anime_slash',
|
('anime_slash',
|
||||||
# [SGKK] Bleach 312v1 [720p/MKV]
|
# [SGKK] Bleach 312v1 [720p/MKV]
|
||||||
'''
|
'''
|
||||||
^(\[(?P<release_group>.+?)\][ ._-]*)? # Release Group and separator
|
^(\[(?P<release_group>.+?)\][ ._-]*)? (?# Release Group and separator)
|
||||||
(?P<series_name>.+?)[ ._-]+ # Show_Name and separator
|
(?P<series_name>.+?)[ ._-]+ (?# Show_Name and separator)
|
||||||
(?P<ep_ab_num>\d{1,3}) # E01
|
(?P<ep_ab_num>\d{1,3}) (?# E01)
|
||||||
(-(?P<extra_ab_ep_num>\d{1,3}))? # E02
|
(-(?P<extra_ab_ep_num>\d{1,3}))? (?# E02)
|
||||||
(v(?P<version>[0-9]))? # version
|
(v(?P<version>[0-9]))? (?# version)
|
||||||
[ ._-]+\[(?P<extra_info>\d{3,4}p) # Source_Quality_Etc-
|
[ ._-]+\[(?P<extra_info>\d{3,4}p) (?# Source_Quality_Etc-)
|
||||||
(\[(?P<crc>\w{8})\])? # CRC
|
(\[(?P<crc>\w{8})\])? (?# CRC)
|
||||||
.*? # Separator and EOL
|
.*? (?# Separator and EOL)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -314,16 +314,16 @@ anime_regexes = [
|
||||||
# [Ayako] Infinite Stratos - IS - 07v2 [H264][720p][44419534]
|
# [Ayako] Infinite Stratos - IS - 07v2 [H264][720p][44419534]
|
||||||
# [Ayako-Shikkaku] Oniichan no Koto Nanka Zenzen Suki Janain Dakara ne - 10 [LQ][h264][720p] [8853B21C]
|
# [Ayako-Shikkaku] Oniichan no Koto Nanka Zenzen Suki Janain Dakara ne - 10 [LQ][h264][720p] [8853B21C]
|
||||||
'''
|
'''
|
||||||
^(\[(?P<release_group>.+?)\][ ._-]*)? # Release Group and separator
|
^(\[(?P<release_group>.+?)\][ ._-]*)? (?# Release Group and separator)
|
||||||
(?P<series_name>.+?)[ ._]* # Show_Name and separator
|
(?P<series_name>.+?)[ ._]* (?# Show_Name and separator)
|
||||||
([ ._-]+-[ ._-]+[A-Z]+[ ._-]+)?[ ._-]+ # this will kick me in the butt one day
|
([ ._-]+-[ ._-]+[A-Z]+[ ._-]+)?[ ._-]+ (?# this will kick me in the butt one day)
|
||||||
(?P<ep_ab_num>\d{1,3}) # E01
|
(?P<ep_ab_num>\d{1,3}) (?# E01)
|
||||||
(-(?P<extra_ab_ep_num>\d{1,3}))? # E02
|
(-(?P<extra_ab_ep_num>\d{1,3}))? (?# E02)
|
||||||
(v(?P<version>[0-9]))? # version
|
(v(?P<version>[0-9]))? (?# version)
|
||||||
([ ._-](\[\w{1,2}\])?\[[a-z][.]?\w{2,4}\])? # codec
|
([ ._-](\[\w{1,2}\])?\[[a-z][.]?\w{2,4}\])? (?# codec)
|
||||||
[ ._-]*\[(?P<extra_info>(\d{3,4}[xp]?\d{0,4})?[\.\w\s-]*)\] # Source_Quality_Etc-
|
[ ._-]*\[(?P<extra_info>(\d{3,4}[xp]?\d{0,4})?[\.\w\s-]*)\] (?# Source_Quality_Etc-)
|
||||||
(\[(?P<crc>\w{8})\])? # CRC
|
(\[(?P<crc>\w{8})\])? (?# CRC)
|
||||||
.*? # Separator and EOL
|
.*? (?# Separator and EOL)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -333,16 +333,16 @@ anime_regexes = [
|
||||||
# Bleach s16e03e04 313-314
|
# Bleach s16e03e04 313-314
|
||||||
'''
|
'''
|
||||||
^(\[(?P<release_group>.+?)\][ ._-]*)?
|
^(\[(?P<release_group>.+?)\][ ._-]*)?
|
||||||
(?P<series_name>.+?)[ ._-]+ # start of string and series name and non optional separator
|
(?P<series_name>.+?)[ ._-]+ (?# start of string and series name and non optional separator)
|
||||||
[sS](?P<season_num>\d+)[. _-]* # S01 and optional separator
|
[sS](?P<season_num>\d+)[. _-]* (?# S01 and optional separator)
|
||||||
[eE](?P<ep_num>\d+) # episode E02
|
[eE](?P<ep_num>\d+) (?# episode E02)
|
||||||
(([. _-]*e|-) # linking e/- char
|
(([. _-]*e|-) (?# linking e/- char)
|
||||||
(?P<extra_ep_num>\d+))* # additional E03/etc
|
(?P<extra_ep_num>\d+))* (?# additional E03/etc)
|
||||||
([ ._-]{2,}|[ ._]+) # if "-" is used to separate at least something else has to be
|
([ ._-]{2,}|[ ._]+) (?# if "-" is used to separate at least something else has to be)
|
||||||
# there(->{2,}) "s16e03-04-313-314" would make sens any way
|
(?# there ->{2,} "s16e03-04-313-314" wouldn't make sense any way)
|
||||||
(?<!H.)(?P<ep_ab_num>\d{1,3})(?!0p) # absolute number
|
(?<!H.)(?P<ep_ab_num>\d{1,3})(?!0p) (?# absolute number)
|
||||||
(-(?P<extra_ab_ep_num>\d{1,3}))* # "-" as separator and additional absolute number, all optional
|
(-(?P<extra_ab_ep_num>\d{1,3}))* (?# "-" as separator and additional absolute number, all optional)
|
||||||
(v(?P<version>[0-9]))? # the version e.g. "v2"
|
(v(?P<version>[0-9]))? (?# the version e.g. "v2")
|
||||||
.*?
|
.*?
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
@ -352,16 +352,16 @@ anime_regexes = [
|
||||||
# Bleach.s16e03-04.313-314
|
# Bleach.s16e03-04.313-314
|
||||||
# Bleach s16e03e04 313-314
|
# Bleach s16e03e04 313-314
|
||||||
'''
|
'''
|
||||||
^(?P<series_name>.+?)[ ._-]+ # start of string and series name and non optional separator
|
^(?P<series_name>.+?)[ ._-]+ (?# start of string and series name and non optional separator)
|
||||||
(?P<season_num>\d+)[. _-]* # S01 and optional separator
|
(?P<season_num>\d+)[. _-]* (?# S01 and optional separator)
|
||||||
[xX](?P<ep_num>\d+) # episode E02
|
[xX](?P<ep_num>\d+) (?# episode E02)
|
||||||
(([. _-]*e|-) # linking e/- char
|
(([. _-]*e|-) (?# linking e/- char)
|
||||||
(?P<extra_ep_num>\d+))* # additional E03/etc
|
(?P<extra_ep_num>\d+))* (?# additional E03/etc)
|
||||||
([ ._-]{2,}|[ ._]+) # if "-" is used to separate at least something else has to be
|
([ ._-]{2,}|[ ._]+) (?# if "-" is used to separate at least something else has to be)
|
||||||
# there(->{2,}) "s16e03-04-313-314" would make sens any way
|
(?# there ->{2,} "s16e03-04-313-314" wouldn't make sense any way)
|
||||||
(?<!H.)(?P<ep_ab_num>\d{1,3})(?!0p) # absolute number
|
(?<!H.)(?P<ep_ab_num>\d{1,3})(?!0p) (?# absolute number)
|
||||||
(-(?P<extra_ab_ep_num>\d{1,3}))* # "-" as separator and additional absolute number, all optional
|
(-(?P<extra_ab_ep_num>\d{1,3}))* (?# "-" as separator and additional absolute number, all optional)
|
||||||
(v(?P<version>[0-9]))? # the version e.g. "v2"
|
(v(?P<version>[0-9]))? (?# the version e.g. "v2")
|
||||||
.*?
|
.*?
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
@ -369,16 +369,16 @@ anime_regexes = [
|
||||||
('anime_and_normal_reverse',
|
('anime_and_normal_reverse',
|
||||||
# Bleach - 313-314 - s16e03-04
|
# Bleach - 313-314 - s16e03-04
|
||||||
'''
|
'''
|
||||||
^(?P<series_name>.+?)[ ._-]+ # start of string and series name and non optional separator
|
^(?P<series_name>.+?)[ ._-]+ (?# start of string and series name and non optional separator)
|
||||||
(?<!H.)(?P<ep_ab_num>\d{1,3})(?!0p) # absolute number
|
(?<!H.)(?P<ep_ab_num>\d{1,3})(?!0p) (?# absolute number)
|
||||||
(-(?P<extra_ab_ep_num>\d{1,3}))* # "-" as separator and additional absolute number, all optional
|
(-(?P<extra_ab_ep_num>\d{1,3}))* (?# "-" as separator and additional absolute number, all optional)
|
||||||
(v(?P<version>[0-9]))? # the version e.g. "v2"
|
(v(?P<version>[0-9]))? (?# the version e.g. "v2")
|
||||||
([ ._-]{2,}|[ ._]+) # if "-" is used to separate at least something else has to be
|
([ ._-]{2,}|[ ._]+) (?# if "-" is used to separate at least something else has to be)
|
||||||
# there(->{2,}) "s16e03-04-313-314" would make sens any way
|
(?# there ->{2,} "s16e03-04-313-314" wouldn't make sense any way)
|
||||||
[sS](?P<season_num>\d+)[. _-]* # S01 and optional separator
|
[sS](?P<season_num>\d+)[. _-]* (?# S01 and optional separator)
|
||||||
[eE](?P<ep_num>\d+) # episode E02
|
[eE](?P<ep_num>\d+) (?# episode E02)
|
||||||
(([. _-]*e|-) # linking e/- char
|
(([. _-]*e|-) (?# linking e/- char)
|
||||||
(?P<extra_ep_num>\d+))* # additional E03/etc
|
(?P<extra_ep_num>\d+))* (?# additional E03/etc)
|
||||||
.*?
|
.*?
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
@ -386,14 +386,14 @@ anime_regexes = [
|
||||||
('anime_and_normal_front',
|
('anime_and_normal_front',
|
||||||
# 165.Naruto Shippuuden.s08e014
|
# 165.Naruto Shippuuden.s08e014
|
||||||
'''
|
'''
|
||||||
^(?<!H.)(?P<ep_ab_num>\d{1,3})(?!0p) # start of string and absolute number
|
^(?<!H.)(?P<ep_ab_num>\d{1,3})(?!0p) (?# start of string and absolute number)
|
||||||
(-(?P<extra_ab_ep_num>\d{1,3}))* # "-" as separator and additional absolute number, all optional
|
(-(?P<extra_ab_ep_num>\d{1,3}))* (?# "-" as separator and additional absolute number, all optional)
|
||||||
(v(?P<version>[0-9]))?[ ._-]+ # the version e.g. "v2"
|
(v(?P<version>[0-9]))?[ ._-]+ (?# the version e.g. "v2")
|
||||||
(?P<series_name>.+?)[ ._-]+
|
(?P<series_name>.+?)[ ._-]+
|
||||||
[sS](?P<season_num>\d+)[. _-]* # S01 and optional separator
|
[sS](?P<season_num>\d+)[. _-]* (?# S01 and optional separator)
|
||||||
[eE](?P<ep_num>\d+)
|
[eE](?P<ep_num>\d+)
|
||||||
(([. _-]*e|-) # linking e/- char
|
(([. _-]*e|-) (?# linking e/- char)
|
||||||
(?P<extra_ep_num>\d+))* # additional E03/etc
|
(?P<extra_ep_num>\d+))* (?# additional E03/etc)
|
||||||
.*?
|
.*?
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
@ -417,10 +417,10 @@ anime_regexes = [
|
||||||
# Show Name 123 - 001
|
# Show Name 123 - 001
|
||||||
'''
|
'''
|
||||||
^(?:\[(?P<release_group>.+?)\][ ._-]*)?
|
^(?:\[(?P<release_group>.+?)\][ ._-]*)?
|
||||||
(?P<series_name>.+?)[ ._-]+[ ._-]{2,} # Show_Name and min 2 char separator
|
(?P<series_name>.+?)[ ._-]+[ ._-]{2,} (?# Show_Name and min 2 char separator)
|
||||||
(?<!H.)(?P<ep_ab_num>\d{1,3})(?!0p) # 1/001, while avoiding H.264 and 1080p from being matched
|
(?<!H.)(?P<ep_ab_num>\d{1,3})(?!0p) (?# 1/001, while avoiding H.264 and 1080p from being matched)
|
||||||
(-(?P<extra_ab_ep_num>\d{1,3}))*[ ._-]* # 2/002
|
(-(?P<extra_ab_ep_num>\d{1,3}))*[ ._-]* (?# 2/002)
|
||||||
(?:v(?P<version>[0-9]))? # v2
|
(?:v(?P<version>[0-9]))? (?# v2)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -428,11 +428,11 @@ anime_regexes = [
|
||||||
# [ACX]_Wolf's_Spirit_001.mkv
|
# [ACX]_Wolf's_Spirit_001.mkv
|
||||||
'''
|
'''
|
||||||
^(\[(?P<release_group>.+?)\][ ._-]*)?
|
^(\[(?P<release_group>.+?)\][ ._-]*)?
|
||||||
(?P<series_name>.+?)[ ._-]+ # Show_Name and separator
|
(?P<series_name>.+?)[ ._-]+ (?# Show_Name and separator)
|
||||||
(?<!H.)(?P<ep_ab_num>\d{3})(?!0p) # E01, while avoiding H.264 and 1080p from being matched
|
(?<!H.)(?P<ep_ab_num>\d{3})(?!0p) (?# E01, while avoiding H.264 and 1080p from being matched)
|
||||||
(-(?P<extra_ab_ep_num>\d{3}))* # E02
|
(-(?P<extra_ab_ep_num>\d{3}))* (?# E02)
|
||||||
(v(?P<version>[0-9]))? # v2
|
(v(?P<version>[0-9]))? (?# v2)
|
||||||
.*? # Separator and EOL
|
.*? (?# Separator and EOL)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -444,14 +444,14 @@ anime_regexes = [
|
||||||
# Show Name - S01E02-03 - My Ep Name
|
# Show Name - S01E02-03 - My Ep Name
|
||||||
# Show.Name.S01.E02.E03
|
# Show.Name.S01.E02.E03
|
||||||
'''
|
'''
|
||||||
^((?P<series_name>.+?)[. _-]+)? # Show_Name and separator
|
^((?P<series_name>.+?)[. _-]+)? (?# Show_Name and separator)
|
||||||
s(?P<season_num>\d+)[. _-]* # S01 and optional separator
|
s(?P<season_num>\d+)[. _-]* (?# S01 and optional separator)
|
||||||
e(?P<ep_num>\d+) # E02 and separator
|
e(?P<ep_num>\d+) (?# E02 and separator)
|
||||||
(([. _-]*e|-) # linking e/- char
|
(([. _-]*e|-) (?# linking e/- char)
|
||||||
(?P<extra_ep_num>(?!(2160|1080|720|480)[pi])\d+))* # additional E03/etc
|
(?P<extra_ep_num>(?!(2160|1080|720|480)[pi])\d+))* (?# additional E03/etc)
|
||||||
[. _-]*((?P<extra_info>.+?) # Source_Quality_Etc-
|
[. _-]*((?P<extra_info>.+?) (?# Source_Quality_Etc-)
|
||||||
((?<![. _-])(?<!WEB) # Make sure this is really the release group
|
((?<![. _-])(?<!WEB) (?# Make sure this is really the release group)
|
||||||
-(?P<release_group>[^- ]+))?)?$ # Group
|
-(?P<release_group>[^- ]+))?)?$ (?# Group)
|
||||||
'''
|
'''
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue