Skip to content

Commit e0f494c

Browse files
committed
lyrics: normalize " & " and " and "
1 parent 620792b commit e0f494c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

beets/autotag/hooks.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ def copy(self) -> TrackInfo:
271271
]
272272
# Replacements to use before testing distance.
273273
SD_REPLACE = [
274-
(r"&", "and"),
274+
(r" & ", ", "),
275+
(r" and ", ", "),
275276
]
276277

277278

test/plugins/test_lyrics.py

+1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ def backend(self, dist_thresh):
156156
(0.11, "Psychonaut", "Psychonaut (BEL)", True),
157157
(0.11, "beets song", "beats song", True),
158158
(0.10, "beets song", "beats song", False),
159+
(0.10, "beets & song", "beats and song", False),
159160
(
160161
0.11,
161162
"Lucid Dreams (Forget Me)",

0 commit comments

Comments
 (0)