Skip to content

Commit

Permalink
Handle more exceptions in title tag normalization code - 65
Browse files Browse the repository at this point in the history
  • Loading branch information
desbma committed Jun 3, 2018
1 parent 5e3bf5f commit c7c31ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion amg/tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ class RecordsSuffixCleaner(RegexSuffixCleaner, SimpleSuffixCleaner):
""" Cleaner to remove record suffix. """

def __init__(self, **kwargs):
super().__init__("[|\)\(\[][0-9a-z ]+records$", suffix="records", **kwargs)
super().__init__("[|\)\(\[][0-9a-z, ]+records$", suffix="records", **kwargs)

def cleanup(self, title):
""" See TitleCleanerBase.cleanup. """
Expand Down
6 changes: 5 additions & 1 deletion tests/test_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,11 @@ def test_normalize_title_tag(self):
("LORDI - Naked In My Cellar [Explicit Version] (2018) // Official Music Video // AFM Records",
"Lordi",
"Sexorcism",
"Naked in My Cellar"))
"Naked in My Cellar"),
("PANEGYRIST - Ophidian Crucifix (2018) I, Voidhanger Records",
"Panegyrist",
"Hierurgy",
"Ophidian Crucifix"))

for source, artist, album, expected_result in references:
with self.subTest(source=source, expected_result=expected_result, artist=artist, album=album):
Expand Down

0 comments on commit c7c31ac

Please sign in to comment.