Skip to content

Commit

Permalink
Handle more exceptions in title tag normalization code - 56
Browse files Browse the repository at this point in the history
  • Loading branch information
desbma committed Feb 22, 2018
1 parent 1ea2d00 commit fd6a655
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 @@ -75,7 +75,7 @@ def __init__(self, artist, album):
words2 = ("", "video", "music", "track", "lyric", "lyrics", "album", "album/tour", "promo", "stream", "single",
"visual", "360", "studio", "audio", "song")
words3 = ("video", "track", "premiere", "premier", "version", "clip", "audio", "stream", "single", "teaser", "presentation",
"song", "in 4k", "4k", "visualizer", "album", "promo", "only", "excerpt", "vr", "lyric")
"song", "in 4k", "4k", "visualizer", "album", "promo", "only", "excerpt", "vr", "lyric", "trailer")
for w1 in words1:
for w2 in words2:
for w3 in words3:
Expand Down
6 changes: 5 additions & 1 deletion tests/test_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,11 @@ def test_normalize_title_tag(self):
("Blackwülf - New Album out 2/24",
"Blackwülf",
"Sinister Sides",
"Blackwülf"))
"Blackwülf"),
("ARMORED DAWN - Barbarians In Black // Album Trailer (2018) // AFM Records",
"Armored Dawn",
"Barbarians in Black",
"Barbarians in Black"))

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 fd6a655

Please sign in to comment.