Fixed issues with post-processing including the web 500 error.

Fixed regex matching for sports.
This commit is contained in:
echel0n 2014-05-08 10:10:13 -07:00
parent 0a14caa38e
commit fc58a44ba2
3 changed files with 8 additions and 4 deletions

View file

@ -194,7 +194,7 @@ sports_regexs = [
''' '''
^(?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<sports_event_id>\d{3})[. _-]+)? ((?P<sports_event_id>\d{3})[. _-]+)?
((?P<sports_event_name>\w+)[. _-]+)? ((?P<sports_event_name>\.+)[. _-]+)?
(?P<sports_event_date>(\d{4}[. _-]+\d{1,2}[. _-]+\d{1,2})|(\d{1,2}\w{2}[. _-]+\w+[. _-]+\d{4})) (?P<sports_event_date>(\d{4}[. _-]+\d{1,2}[. _-]+\d{1,2})|(\d{1,2}\w{2}[. _-]+\w+[. _-]+\d{4}))
[. _-]*((?P<extra_info>.+?)((?<![. _-])(?<!WEB) [. _-]*((?P<extra_info>.+?)((?<![. _-])(?<!WEB)
-(?P<release_group>[^- ]+))?)?$ -(?P<release_group>[^- ]+))?)?$

View file

@ -486,7 +486,7 @@ class PostProcessor(object):
np = NameParser(file) np = NameParser(file)
parse_result = np.parse(name) parse_result = np.parse(name)
self._log("Parsed " + name + " into " + str(parse_result).decode('utf-8'), logger.DEBUG) self._log(u"Parsed " + name + " into " + str(parse_result).decode('utf-8', 'xmlcharrefreplace'), logger.DEBUG)
if parse_result.air_by_date: if parse_result.air_by_date:
season = -1 season = -1
@ -915,6 +915,7 @@ class PostProcessor(object):
# find the destination folder # find the destination folder
try: try:
proper_path = ep_obj.proper_path() proper_path = ep_obj.proper_path()
test = proper_path
proper_absolute_path = ek.ek(os.path.join, ep_obj.show.location, proper_path) proper_absolute_path = ek.ek(os.path.join, ep_obj.show.location, proper_path)
dest_path = ek.ek(os.path.dirname, proper_absolute_path) dest_path = ek.ek(os.path.dirname, proper_absolute_path)

View file

@ -2055,10 +2055,13 @@ class TVEpisode(object):
else: else:
pattern = sickbeard.NAMING_PATTERN pattern = sickbeard.NAMING_PATTERN
# split off the filename only, if they exist # split off the dirs only, if they exist
name_groups = re.split(r'[\\/]', pattern) name_groups = re.split(r'[\\/]', pattern)
return self._format_pattern(name_groups[-1], multi) if len(name_groups) == 1:
return ''
else:
return self._format_pattern(os.sep.join(name_groups[:-1]), multi)
def rename(self): def rename(self):
""" """