mirror of
https://github.com/beetbox/beets.git
synced 2025-12-16 05:34:47 +01:00
Add parentheses as delimiters for feat. detection
When checking whether a title or artist contains a feature, it now also detects them when they are in parentheses or brackets, i.e., "Song Name (feat. XYZ)" will return true.
This commit is contained in:
parent
88d3f040e1
commit
8c60d2b960
1 changed files with 1 additions and 1 deletions
|
|
@ -518,7 +518,7 @@ def feat_tokens(for_artist=True):
|
|||
feat_words = ["ft", "featuring", "feat", "feat.", "ft."]
|
||||
if for_artist:
|
||||
feat_words += ["with", "vs", "and", "con", "&"]
|
||||
return r"(?<=\s)(?:{})(?=\s)".format(
|
||||
return r"(?<=[\s,(,\[])(?:{})(?=\s)".format(
|
||||
"|".join(re.escape(x) for x in feat_words)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue