From ed627c031c1223e45324a30fdfce0be5aba30bcd Mon Sep 17 00:00:00 2001 From: Karl Besser Date: Mon, 30 Sep 2024 10:24:09 -0500 Subject: [PATCH] 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. --- beetsplug/ftintitle.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beetsplug/ftintitle.py b/beetsplug/ftintitle.py index 2c4634002..e4f51fd10 100644 --- a/beetsplug/ftintitle.py +++ b/beetsplug/ftintitle.py @@ -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}"