mirror of
https://github.com/beetbox/beets.git
synced 2025-12-28 03:22:39 +01:00
Hardcode for_artist keyword in ftintitle plugin
Remove the optional `for_artist` keyword in the `ftintitle.contains_feat` function and hardcode it to False, since it is always used like this in the ftintitle plugin.
This commit is contained in:
parent
71b5a9651c
commit
ed627c031c
1 changed files with 3 additions and 3 deletions
|
|
@ -35,11 +35,11 @@ def split_on_feat(artist):
|
|||
return tuple(parts)
|
||||
|
||||
|
||||
def contains_feat(title, for_artist=True):
|
||||
def contains_feat(title):
|
||||
"""Determine whether the title contains a "featured" marker."""
|
||||
return bool(
|
||||
re.search(
|
||||
plugins.feat_tokens(for_artist=for_artist),
|
||||
plugins.feat_tokens(for_artist=False),
|
||||
title,
|
||||
flags=re.IGNORECASE,
|
||||
)
|
||||
|
|
@ -149,7 +149,7 @@ class FtInTitlePlugin(plugins.BeetsPlugin):
|
|||
|
||||
# Only update the title if it does not already contain a featured
|
||||
# artist and if we do not drop featuring information.
|
||||
if not drop_feat and not contains_feat(item.title, for_artist=False):
|
||||
if not drop_feat and not contains_feat(item.title):
|
||||
feat_format = self.config["format"].as_str()
|
||||
new_format = feat_format.format(feat_part)
|
||||
new_title = f"{item.title} {new_format}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue