beetz
September 29, 2019, 4:46am
1
It looks like FtInTitle currently only applies its changes to artists containing “feat.” and ignores those with “ft.” and “&”. Is this intentional or is it something that could be adjusted?
adrian
September 30, 2019, 6:24pm
2
Hi! We actually search for more than just feat.
. The full list comes from here:
def feat_tokens(for_artist=True):
"""Return a regular expression that matches phrases like "featuring"
that separate a main artist or a song title from secondary artists.
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.', 'ft.']
if for_artist:
feat_words += ['with', 'vs', 'and', 'con', '&']
return '(?<=\s)(?:{0})(?=\s)'.format(
'|'.join(re.escape(x) for x in feat_words)
)
So it actually includes ft.
and, in some cases, &
. Making this configurable could be cool too.
1 Like