mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 11:32:20 -05:00
Fixes for scene conversion and regexs
This commit is contained in:
parent
308add5a11
commit
071d51fcda
@ -54,7 +54,7 @@ class FailedProcessor(object):
|
|||||||
|
|
||||||
parser = NameParser(False)
|
parser = NameParser(False)
|
||||||
try:
|
try:
|
||||||
parsed = parser.parse(releaseName)
|
parsed = parser.parse(releaseName).convert()
|
||||||
except InvalidNameException:
|
except InvalidNameException:
|
||||||
self._log(u"Error: release name is invalid: " + releaseName, logger.WARNING)
|
self._log(u"Error: release name is invalid: " + releaseName, logger.WARNING)
|
||||||
raise exceptions.FailedProcessingFailed()
|
raise exceptions.FailedProcessingFailed()
|
||||||
|
@ -30,7 +30,7 @@ class NameParser(object):
|
|||||||
NORMAL_REGEX = 1
|
NORMAL_REGEX = 1
|
||||||
SPORTS_REGEX = 2
|
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.file_name = file_name
|
||||||
self.regexMode = regexMode
|
self.regexMode = regexMode
|
||||||
|
@ -193,7 +193,7 @@ sports_regexs = [
|
|||||||
# Sports.Name.23rd.Nov.2010.Source.Quality.Etc-Group
|
# Sports.Name.23rd.Nov.2010.Source.Quality.Etc-Group
|
||||||
'''
|
'''
|
||||||
^(?P<series_name>.+?)[. _-]+
|
^(?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<extra_info>.+?)((?<![. _-])(?<!WEB)
|
||||||
-(?P<release_group>[^- ]+))?)?$
|
-(?P<release_group>[^- ]+))?)?$
|
||||||
'''
|
'''
|
||||||
|
@ -114,7 +114,7 @@ def splitResult(result):
|
|||||||
# parse the season ep name
|
# parse the season ep name
|
||||||
try:
|
try:
|
||||||
np = NameParser(False)
|
np = NameParser(False)
|
||||||
parse_result = np.parse(result.name)
|
parse_result = np.parse(result.name).convert()
|
||||||
except InvalidNameException:
|
except InvalidNameException:
|
||||||
logger.log(u"Unable to parse the filename " + result.name + " into a valid episode", logger.WARNING)
|
logger.log(u"Unable to parse the filename " + result.name + " into a valid episode", logger.WARNING)
|
||||||
return False
|
return False
|
||||||
|
@ -117,7 +117,7 @@ class HDBitsProvider(generic.TorrentProvider):
|
|||||||
# parse the file name
|
# parse the file name
|
||||||
try:
|
try:
|
||||||
myParser = NameParser()
|
myParser = NameParser()
|
||||||
parse_result = myParser.parse(title)
|
parse_result = myParser.parse(title).convert()
|
||||||
except InvalidNameException:
|
except InvalidNameException:
|
||||||
logger.log(u"Unable to parse the filename " + title + " into a valid episode", logger.WARNING)
|
logger.log(u"Unable to parse the filename " + title + " into a valid episode", logger.WARNING)
|
||||||
continue
|
continue
|
||||||
|
@ -148,7 +148,7 @@ class KATProvider(generic.TorrentProvider):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
myParser = NameParser()
|
myParser = NameParser()
|
||||||
parse_result = myParser.parse(fileName)
|
parse_result = myParser.parse(fileName).convert()
|
||||||
except InvalidNameException:
|
except InvalidNameException:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ class ThePirateBayProvider(generic.TorrentProvider):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
myParser = NameParser()
|
myParser = NameParser()
|
||||||
parse_result = myParser.parse(fileName)
|
parse_result = myParser.parse(fileName).convert()
|
||||||
except InvalidNameException:
|
except InvalidNameException:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user