From 071d51fcda7513744928cbc05453ce89dd4442fd Mon Sep 17 00:00:00 2001 From: echel0n Date: Thu, 1 May 2014 00:18:52 -0700 Subject: [PATCH] Fixes for scene conversion and regexs --- sickbeard/failedProcessor.py | 2 +- sickbeard/name_parser/parser.py | 2 +- sickbeard/name_parser/regexes.py | 2 +- sickbeard/nzbSplitter.py | 2 +- sickbeard/providers/hdbits.py | 2 +- sickbeard/providers/kat.py | 2 +- sickbeard/providers/thepiratebay.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sickbeard/failedProcessor.py b/sickbeard/failedProcessor.py index 516a7c0e..32a41391 100644 --- a/sickbeard/failedProcessor.py +++ b/sickbeard/failedProcessor.py @@ -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() diff --git a/sickbeard/name_parser/parser.py b/sickbeard/name_parser/parser.py index 86a98681..a312005c 100644 --- a/sickbeard/name_parser/parser.py +++ b/sickbeard/name_parser/parser.py @@ -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 diff --git a/sickbeard/name_parser/regexes.py b/sickbeard/name_parser/regexes.py index aa361592..f2cb38f9 100644 --- a/sickbeard/name_parser/regexes.py +++ b/sickbeard/name_parser/regexes.py @@ -193,7 +193,7 @@ sports_regexs = [ # Sports.Name.23rd.Nov.2010.Source.Quality.Etc-Group ''' ^(?P.+?)[. _-]+ - (?P(\d{4}[. _-]+\d{2}[. _-]+\d{2})|(\d{2}\w{2}[. _-]+\w+[. _-]+\d{4})) + (?P(\d{4}[. _-]+\d{1,2}[. _-]+\d{1,2})|(\d{1,2}\w{2}[. _-]+\w+[. _-]+\d{4})) [. _-]*((?P.+?)((?[^- ]+))?)?$ ''' diff --git a/sickbeard/nzbSplitter.py b/sickbeard/nzbSplitter.py index 08791bb1..24451ec2 100644 --- a/sickbeard/nzbSplitter.py +++ b/sickbeard/nzbSplitter.py @@ -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 diff --git a/sickbeard/providers/hdbits.py b/sickbeard/providers/hdbits.py index e33f3165..360632cd 100644 --- a/sickbeard/providers/hdbits.py +++ b/sickbeard/providers/hdbits.py @@ -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 diff --git a/sickbeard/providers/kat.py b/sickbeard/providers/kat.py index 1d8aa422..06260030 100644 --- a/sickbeard/providers/kat.py +++ b/sickbeard/providers/kat.py @@ -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 diff --git a/sickbeard/providers/thepiratebay.py b/sickbeard/providers/thepiratebay.py index fc8e145e..96824066 100644 --- a/sickbeard/providers/thepiratebay.py +++ b/sickbeard/providers/thepiratebay.py @@ -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