diff --git a/CHANGES.md b/CHANGES.md index 9802e182..3f7a52c2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,9 @@ -### 3.31.1 (2024-06-14 01:00:00 UTC) +### 3.31.2 (2024-06-23 18:20:00 UTC) + +* Fix parsing show names that contain the word "parts" by making parser more restrictive + + +### 3.31.1 (2024-06-14 01:00:00 UTC) * Change allow Python 3.12.4 diff --git a/sickgear/name_parser/parser.py b/sickgear/name_parser/parser.py index 0a3189bf..0ca5c1f0 100644 --- a/sickgear/name_parser/parser.py +++ b/sickgear/name_parser/parser.py @@ -170,7 +170,7 @@ class NameParser(object): result.series_name = match.group('series_name') if result.series_name: result.series_name = self.clean_series_name(result.series_name) - name_parts = re.match(r'(?i)(.*)[ -]((?:part|pt)[ -]?\w+)$', result.series_name) + name_parts = re.match(r'(?i)(.*)[ -]((?:part|pt)[ -]?[0-9IVXL]+)$', result.series_name) try: result.series_name = name_parts.group(1) result.extra_info = name_parts.group(2) diff --git a/tests/name_parser_tests.py b/tests/name_parser_tests.py index b677699f..d1f47c26 100644 --- a/tests/name_parser_tests.py +++ b/tests/name_parser_tests.py @@ -44,6 +44,8 @@ simple_test_cases = { 'Show.Name.S01E15-11001001': parser.ParseResult(None, 'Show Name', 1, [15], None), 'Show.Name.S01E02.Source.Quality.Etc-Group - [stuff]': parser.ParseResult(None, 'Show Name', 1, [2], 'Source.Quality.Etc', 'Group'), + 'Show.Name.Parts.S02E01': + parser.ParseResult(None, 'Show Name Parts', 2, [1]), }, 'non_standard_multi_ep': {