Skip to content

Commit

Permalink
Handle more exceptions in title tag normalization code - 61
Browse files Browse the repository at this point in the history
  • Loading branch information
desbma committed Apr 1, 2018
1 parent 0cc1fad commit dd8d3de
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 @@ -38,7 +38,7 @@ def __init__(self, artist, album):
self.registerCleaner(RegexSuffixCleaner("from .* LP", execute_once=True))

# detect and remove 'from xxx album' suffix
self.registerCleaner(RegexSuffixCleaner("from .* album", execute_once=True))
self.registerCleaner(RegexSuffixCleaner("from .*album", execute_once=True))

# detect and remove 'xxx out: yy.zz.aa' suffix
self.registerCleaner(RegexSuffixCleaner(" [^ ]* out: [0-9]+.[0-9]+.[0-9]+", execute_once=True))
Expand Down
6 changes: 5 additions & 1 deletion tests/test_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,11 @@ def test_normalize_title_tag(self):
("MELTED SPACE LYRIC VIDEO - THE DAWN OF MAN (I'M ALIVE!)",
"Melted Space",
"Darkening Light",
"The Dawn of Man (I'm Alive!)"))
"The Dawn of Man (I'm Alive!)"),
("Altars of Grief - Desolation [From album; Iris; 2018]",
"Altars of Grief",
"Iris",
"Desolation"))

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 dd8d3de

Please sign in to comment.