diff --git a/amg/tag.py b/amg/tag.py index 9d39127..abf01f8 100644 --- a/amg/tag.py +++ b/amg/tag.py @@ -125,6 +125,9 @@ def __init__(self, artist, album): # fix paired chars self.registerCleaner(PairedCharCleaner(execute_once=True)) + # remove some punctuation + self.registerCleaner(FunctionCleaner(lambda x: x.strip("-"), execute_once=True)) + # normalize case self.registerCleaner(FunctionCleaner(sanitize.normalize_tag_case, execute_once=True)) diff --git a/tests/test_tag.py b/tests/test_tag.py index d50b47a..0417a68 100644 --- a/tests/test_tag.py +++ b/tests/test_tag.py @@ -306,18 +306,6 @@ def test_normalize_title_tag(self): "Stallion", "From the Dead", "Waiting for a Sign"), - ("Dystopia -Vanishing Point-", - "Boris", - "Dear", - "Dystopia -Vanishing Point-"), - ("DEADSONG", - "Boris", - "Dear", - "Deadsong"), - ("D.O.W.N -Domination of Waiting Noise-", - "Boris", - "Dear", - "D.O.W.N -Domination of Waiting Noise-"), ("OBSCURITY - WAS UNS BLEIBT (OFFICIAL LYRIC VIDEO) | TROLLZORN", "Obscurity", "Streitmacht", @@ -489,7 +477,11 @@ def test_normalize_title_tag(self): ("ABSTRACTER - Ashen Reign (2018) I, Voidhanger Records/Sentient Ruin Laboratories/Daymare Recordings", "Abstracter", "Cinereous Incarnate", - "Ashen Reign")) + "Ashen Reign"), + ("SECRET CUTTER - Trampled By Light --LYRIC VIDEO--", + "Secret Cutter", + "Quantum Eraser", + "Trampled by Light")) for source, artist, album, expected_result in references: with self.subTest(source=source, expected_result=expected_result, artist=artist, album=album):