Skip to content

Commit

Permalink
More flexible title splitting (#1060)
Browse files Browse the repository at this point in the history
These tokens should not be artist-exclusive.
  • Loading branch information
sampsyo committed Dec 16, 2014
1 parent c2c1e72 commit af11ded
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions beets/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,9 @@ def feat_tokens(for_artist=True):
The `for_artist` option determines whether the regex should be
suitable for matching artist fields (the default) or title fields.
"""
feat_words = ['ft', 'featuring', 'feat']
feat_words = ['ft', 'featuring', 'feat', 'feat.', 'ft.']
if for_artist:
feat_words += ['with', 'vs', 'and', 'con', '&', 'feat.', 'ft.']
feat_words += ['with', 'vs', 'and', 'con', '&']
return '(?<=\s)(?:{0})(?=\s)'.format(
'|'.join(re.escape(x) for x in feat_words)
)

0 comments on commit af11ded

Please sign in to comment.