mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 08:53:37 +00:00
Fixed issues with post-processing including the web 500 error.
Fixed regex matching for sports.
This commit is contained in:
parent
0a14caa38e
commit
fc58a44ba2
3 changed files with 8 additions and 4 deletions
|
@ -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<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<extra_info>.+?)((?<![. _-])(?<!WEB)
|
||||
-(?P<release_group>[^- ]+))?)?$
|
||||
|
|
|
@ -486,7 +486,7 @@ class PostProcessor(object):
|
|||
np = NameParser(file)
|
||||
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:
|
||||
season = -1
|
||||
|
@ -915,6 +915,7 @@ class PostProcessor(object):
|
|||
# find the destination folder
|
||||
try:
|
||||
proper_path = ep_obj.proper_path()
|
||||
test = 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)
|
||||
|
|
|
@ -2055,10 +2055,13 @@ class TVEpisode(object):
|
|||
else:
|
||||
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)
|
||||
|
||||
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):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue