From bfd95f47d0a135800a7433e22004422c99588d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20M=C3=B6llerstrand?= Date: Tue, 17 Feb 2026 08:10:58 +0100 Subject: [PATCH 1/2] fix: ftintitle can handle a list of ampersanded artists This was inspired by real life events: https://musicbrainz.org/release/7c4d7a15-6b30-4bef-8b20-af200186fbdb by the artist Danny L Harle has a a track with a featuring list that contains "Danny L Harle, Oklou & MNEK". --- beetsplug/ftintitle.py | 6 ++++++ docs/changelog.rst | 2 ++ test/plugins/test_ftintitle.py | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/beetsplug/ftintitle.py b/beetsplug/ftintitle.py index fde7ff92a..362bab523 100644 --- a/beetsplug/ftintitle.py +++ b/beetsplug/ftintitle.py @@ -71,6 +71,12 @@ def split_on_feat( if len(parts) == 2: return parts + # Try comma as separator + # (e.g. "Alice, Bob & Charlie" where Bob and Charlie are featuring) + if for_artist and "," in artist: + comma_parts = artist.split(",", 1) + return comma_parts[0].strip(), comma_parts[1].strip() + # Fall back to all tokens including generic separators if no explicit match if for_artist: regex = re.compile( diff --git a/docs/changelog.rst b/docs/changelog.rst index 6cd8d7623..b8812a706 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -86,6 +86,8 @@ Bug fixes backends, such as ``mp3gain``. :bug:`2946` - :doc:`plugins/mbpseudo`: Fix crash due to missing ``artist_credit`` field in the MusicBrainz API response. :bug:`6339` +- :doc:`plugins/ftintitle`: Fix handling of multiple featured artists with + ampersand. .. For plugin developers diff --git a/test/plugins/test_ftintitle.py b/test/plugins/test_ftintitle.py index 560f44402..2bba41ad0 100644 --- a/test/plugins/test_ftintitle.py +++ b/test/plugins/test_ftintitle.py @@ -324,6 +324,11 @@ def test_find_feat_part( ("Alice feat. Bob", ("Alice", "Bob")), ("Alice featuring Bob", ("Alice", "Bob")), ("Alice & Bob", ("Alice", "Bob")), + ("Alice, Bob & Charlie", ("Alice", "Bob & Charlie")), + ( + "Alice, Bob & Charlie feat. Xavier", + ("Alice, Bob & Charlie", "Xavier"), + ), ("Alice and Bob", ("Alice", "Bob")), ("Alice With Bob", ("Alice", "Bob")), ("Alice defeat Bob", ("Alice defeat Bob", None)), From b17305aa1e312605df047812bcffb7145f6215d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0ar=C5=ABnas=20Nejus?= Date: Mon, 2 Mar 2026 14:54:34 +0000 Subject: [PATCH 2/2] Update changelog note --- docs/changelog.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index b8812a706..8bbe8f4ea 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -36,9 +36,11 @@ New features 3. Comma followed by a space 4. Slash wrapped by spaces -.. - Bug fixes - ~~~~~~~~~ +Bug fixes +~~~~~~~~~ + +- :doc:`plugins/ftintitle`: Fix handling of multiple featured artists with + ampersand. For plugin developers ~~~~~~~~~~~~~~~~~~~~~ @@ -86,8 +88,6 @@ Bug fixes backends, such as ``mp3gain``. :bug:`2946` - :doc:`plugins/mbpseudo`: Fix crash due to missing ``artist_credit`` field in the MusicBrainz API response. :bug:`6339` -- :doc:`plugins/ftintitle`: Fix handling of multiple featured artists with - ampersand. .. For plugin developers