1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Fixes for scene conversion and regexs

This commit is contained in:
echel0n 2014-05-01 00:18:52 -07:00
parent 308add5a11
commit 071d51fcda
7 changed files with 7 additions and 7 deletions

View File

@ -54,7 +54,7 @@ class FailedProcessor(object):
parser = NameParser(False)
try:
parsed = parser.parse(releaseName)
parsed = parser.parse(releaseName).convert()
except InvalidNameException:
self._log(u"Error: release name is invalid: " + releaseName, logger.WARNING)
raise exceptions.FailedProcessingFailed()

View File

@ -30,7 +30,7 @@ class NameParser(object):
NORMAL_REGEX = 1
SPORTS_REGEX = 2
def __init__(self, file_name=True, regexMode=1):
def __init__(self, file_name=True, regexMode=0):
self.file_name = file_name
self.regexMode = regexMode

View File

@ -193,7 +193,7 @@ sports_regexs = [
# Sports.Name.23rd.Nov.2010.Source.Quality.Etc-Group
'''
^(?P<series_name>.+?)[. _-]+
(?P<sports_event_date>(\d{4}[. _-]+\d{2}[. _-]+\d{2})|(\d{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<release_group>[^- ]+))?)?$
'''

View File

@ -114,7 +114,7 @@ def splitResult(result):
# parse the season ep name
try:
np = NameParser(False)
parse_result = np.parse(result.name)
parse_result = np.parse(result.name).convert()
except InvalidNameException:
logger.log(u"Unable to parse the filename " + result.name + " into a valid episode", logger.WARNING)
return False

View File

@ -117,7 +117,7 @@ class HDBitsProvider(generic.TorrentProvider):
# parse the file name
try:
myParser = NameParser()
parse_result = myParser.parse(title)
parse_result = myParser.parse(title).convert()
except InvalidNameException:
logger.log(u"Unable to parse the filename " + title + " into a valid episode", logger.WARNING)
continue

View File

@ -148,7 +148,7 @@ class KATProvider(generic.TorrentProvider):
try:
myParser = NameParser()
parse_result = myParser.parse(fileName)
parse_result = myParser.parse(fileName).convert()
except InvalidNameException:
return None

View File

@ -157,7 +157,7 @@ class ThePirateBayProvider(generic.TorrentProvider):
try:
myParser = NameParser()
parse_result = myParser.parse(fileName)
parse_result = myParser.parse(fileName).convert()
except InvalidNameException:
return None