From 31ce517e8fe85d8b9988542f8df06c33e28de96d Mon Sep 17 00:00:00 2001 From: echel0n Date: Sat, 7 Jun 2014 01:57:03 -0700 Subject: [PATCH] Added 480p to be ignored for anime regexes when matching for absolute numbers. --- sickbeard/classes.py | 2 +- sickbeard/name_parser/regexes.py | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sickbeard/classes.py b/sickbeard/classes.py index 418042c4..8fa2a317 100644 --- a/sickbeard/classes.py +++ b/sickbeard/classes.py @@ -168,7 +168,7 @@ class AllShowsListUI: seriesnames.extend(unicode(curShow['aliasnames']).split('|')) for name in seriesnames: - if searchterm.lower() in name.lower(): + if str(searchterm).lower() in str(name).lower(): if 'firstaired' not in curShow: curShow['firstaired'] = str(datetime.date.fromordinal(1)) curShow['firstaired'] = re.sub("([-]0{2}){1,}", "", curShow['firstaired']) diff --git a/sickbeard/name_parser/regexes.py b/sickbeard/name_parser/regexes.py index d6f4e22a..c9aed6f9 100644 --- a/sickbeard/name_parser/regexes.py +++ b/sickbeard/name_parser/regexes.py @@ -59,7 +59,7 @@ normal_regexes = {'normal':[ s(?P\d+)[. _-]* # S01 and optional separator e(?P\d+) # E02 and separator (([. _-]*e|-) # linking e/- char - (?P(?!(1080|720)[pi])\d+))* # additional E03/etc + (?P(?!(1080|720|480)[pi])\d+))* # additional E03/etc [. _-]*((?P.+?) # Source_Quality_Etc- ((?[^- ]+))?)?$ # Group @@ -76,7 +76,7 @@ normal_regexes = {'normal':[ (?P\d+) # 02 and separator (([. _-]*x|-) # linking x/- char (?P - (?!(1080|720)[pi])(?!(?<=x)264) # ignore obviously wrong multi-eps + (?!(1080|720|480)[pi])(?!(?<=x)264) # ignore obviously wrong multi-eps \d+))* # additional x03/etc [\]. _-]*((?P.+?) # Source_Quality_Etc- ((?(\d+|[ivx]+)) # first ep num ((([. _-]+(and|&|to)[. _-]+)|-) # and/&/to joiner - (?P(?!(1080|720)[pi])(\d+|[ivx]+))[. _-]) # second ep num + (?P(?!(1080|720|480)[pi])(\d+|[ivx]+))[. _-]) # second ep num ([. _-]*(?P.+?) # Source_Quality_Etc- ((?[^- ]+))?)?$ # Group @@ -153,7 +153,7 @@ normal_regexes = {'normal':[ (?P(\d+|([ivx]+(?=[. _-])))) # first ep num ([. _-]+((and|&|to)[. _-]+)? # and/&/to joiner ((e(p(isode)?)?|part|pt)[. _-]?) # e, ep, episode, or part - (?P(?!(1080|720)[pi]) + (?P(?!(1080|720|480)[pi]) (\d+|([ivx]+(?=[. _-]))))[. _-])* # second ep num ([. _-]*(?P.+?) # Source_Quality_Etc- ((?.+?)\][ ._-]*) (?P.+?)[ ._-]+ - (?P(?!(1080|720)[pi])\d{1,3}) + (?P(?!(1080|720|480)[pi])\d{1,3}) (-(?P\d{1,3}))?[ ._-]+? (?:v(?P[0-9]))? (?:[\w\.]*) @@ -241,7 +241,7 @@ anime_regexes = {'anime':[ ''' ^(\[(?P.+?)\][ ._-]*)? # Release Group and separator (?P.+?)[ ._-]+ # Show_Name and separator - (?P(?!(1080|720)[pi])\d{1,3}) # E01 + (?P(?!(1080|720|480)[pi])\d{1,3}) # E01 (-(?P\d{1,3}))? # E02 (v(?P[0-9]))? # version [ ._-]+\[(?P\d{3,4}[xp]?\d{0,4}[\.\w\s-]*)\] # Source_Quality_Etc- @@ -256,7 +256,7 @@ anime_regexes = {'anime':[ ''' ^(\[(?P.+?)\][ ._-]*)? # Release Group and separator (?P.+?)[ ._-]+ # Show_Name and separator - (?P(?!(1080|720)[pi])\d{1,3}) # E01 + (?P(?!(1080|720|480)[pi])\d{1,3}) # E01 (-(?P\d{1,3}))? # E02 (v(?P[0-9]))? # version [ ._-]+\((?P(CX[ ._-]?)?\d{3,4}[xp]?\d{0,4}[\.\w\s-]*)\) # Source_Quality_Etc- @@ -269,7 +269,7 @@ anime_regexes = {'anime':[ ''' ^(\[(?P.+?)\][ ._-]*)? # Release Group and separator (?P.+?)[ ._-]+ # Show_Name and separator - (?P(?!(1080|720)[pi])\d{1,3}) # E01 + (?P(?!(1080|720|480)[pi])\d{1,3}) # E01 (-(?P\d{1,3}))? # E02 (v(?P[0-9]))? # version [ ._-]+\[(?P\d{3,4}p) # Source_Quality_Etc- @@ -285,7 +285,7 @@ anime_regexes = {'anime':[ ^(\[(?P.+?)\][ ._-]*)? # Release Group and separator (?P.+?)[ ._]* # Show_Name and separator ([ ._-]+-[ ._-]+[A-Z]+[ ._-]+)?[ ._-]+ # funny stuff, this is sooo nuts ! this will kick me in the butt one day - (?P(?!(1080|720)[pi])\d{1,3}) # E01 + (?P(?!(1080|720|480)[pi])\d{1,3}) # E01 (-(?P\d{1,3}))? # E02 (v(?P[0-9]))? # version ([ ._-](\[\w{1,2}\])?\[[a-z][.]?\w{2,4}\])? #codec @@ -315,7 +315,7 @@ anime_regexes = {'anime':[ (([. _-]*e|-) # linking e/- char (?P\d+))* # additional E03/etc ([ ._-]{2,}|[ ._]+) # if "-" is used to separate at least something else has to be there(->{2,}) "s16e03-04-313-314" would make sens any way - (?P(?!(1080|720)[pi])\d{1,3}) # absolute number + (?P(?!(1080|720|480)[pi])\d{1,3}) # absolute number (-(?P\d{1,3}))? # "-" as separator and anditional absolute number, all optinal (v(?P[0-9]))? # the version e.g. "v2" .*? @@ -334,7 +334,7 @@ anime_regexes = {'anime':[ (([. _-]*e|-) # linking e/- char (?P\d+))* # additional E03/etc ([ ._-]{2,}|[ ._]+) # if "-" is used to separate at least something else has to be there(->{2,}) "s16e03-04-313-314" would make sens any way - (?P(?!(1080|720)[pi])\d{1,3}) # absolute number + (?P(?!(1080|720|480)[pi])\d{1,3}) # absolute number (-(?P\d{1,3}))? # "-" as separator and anditional absolute number, all optinal (v(?P[0-9]))? # the version e.g. "v2" .*? @@ -346,7 +346,7 @@ anime_regexes = {'anime':[ # Bleach - 313-314 - s16e03-04 ''' ^(?P.+?)[ ._-]+ # start of string and series name and non optinal separator - (?P(?!(1080|720)[pi])\d{1,3}) # absolute number + (?P(?!(1080|720|480)[pi])\d{1,3}) # absolute number (-(?P\d{1,3}))? # "-" as separator and anditional absolute number, all optinal (v(?P[0-9]))? # the version e.g. "v2" ([ ._-]{2,}|[ ._]+) # if "-" is used to separate at least something else has to be there(->{2,}) "s16e03-04-313-314" would make sens any way @@ -361,7 +361,7 @@ anime_regexes = {'anime':[ ('anime_and_normal_front', # 165.Naruto Shippuuden.s08e014 ''' - ^(?P(?!(1080|720)[pi])\d{1,3}) # start of string and absolute number + ^(?P(?!(1080|720|480)[pi])\d{1,3}) # start of string and absolute number (-(?P\d{1,3}))? # "-" as separator and anditional absolute number, all optinal (v(?P[0-9]))?[ ._-]+ # the version e.g. "v2" (?P.+?)[ ._-]+ @@ -377,7 +377,7 @@ anime_regexes = {'anime':[ ''' ^(?:\[(?P.+?)\][ ._-]*) (?P.+?)[ ._-]+ - (?P(?!(1080|720)[pi])\d{1,3}) + (?P(?!(1080|720|480)[pi])\d{1,3}) (-(?P\d{1,3}))?[ ._-]*? (?:v(?P[0-9])[ ._-]+?)? (?:.+?[ ._-]+?)? @@ -393,7 +393,7 @@ anime_regexes = {'anime':[ ''' ^(\[(?P.+?)\][ ._-]*)? (?P.+?)[ ._-]+ # Show_Name and separator - (?P(?!(1080|720)[pi])\d{1,3}) # E01 + (?P(?!(1080|720|480)[pi])\d{1,3}) # E01 (-(?P\d{3}))? # E02 (v(?P[0-9]))? # v2 .*? # Separator and EOL