Skip to content

fix(ftintitle): parenthetical features#6716

Open
treyturner wants to merge 1 commit into
beetbox:masterfrom
treyturner:fix/ftintitle_parenthetical_features
Open

fix(ftintitle): parenthetical features#6716
treyturner wants to merge 1 commit into
beetbox:masterfrom
treyturner:fix/ftintitle_parenthetical_features

Conversation

@treyturner

@treyturner treyturner commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #6715: ftintitle handling for featured artists wrapped in parentheses or square brackets.

Before this change, parenthetical features were split at the feature token but the surrounding delimiters were left behind on both sides. For example:

Alice (ft. Bob) - Song

became:

Alice ( - Song ft. Bob)

With this PR, we get the intended:

Alice - Song ft. Bob

The same cleanup applies to square brackets, e.g. Alice [ft. Bob].

Details

  • Strip a matching () or [] pair when it encloses the feature marker split.
  • Ensures artist names with parens or brackets retain them, e.g. Alice ft. (Bob) still extracts (Bob).
  • Handle album-artist matching when the album artist is the bracketed featured artist, e.g. Alice [ft. Bob] on Bob’s album extracts Alice.
  • Doc update explaining the behavior.

Tests

  • Added focused ftintitle cases for:
    • functional parenthetical feature cleanup
    • bracketed find_feat_part album-artist behavior
    • split_on_feat delimiter cleanup and non-cleanup boundaries

To Do

  • Documentation. (If you've added a new command-line flag, for example, find the appropriate page under docs/ to describe it.)
  • Changelog. (Add an entry to docs/changelog.rst to the bottom of one of the lists near the top of the document.)
  • Tests. (Very much encouraged but not strictly required.)

@treyturner treyturner requested a review from a team as a code owner June 7, 2026 08:36
@github-actions github-actions Bot added the ftintitle ftintitle plugin label Jun 7, 2026
@github-actions

github-actions Bot commented Jun 7, 2026

Copy link
Copy Markdown

Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry.

@codecov

codecov Bot commented Jun 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.61%. Comparing base (73605d5) to head (c1de81d).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
beetsplug/ftintitle.py 92.30% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6716   +/-   ##
=======================================
  Coverage   74.60%   74.61%           
=======================================
  Files         163      163           
  Lines       20830    20852   +22     
  Branches     3283     3289    +6     
=======================================
+ Hits        15541    15559   +18     
- Misses       4538     4540    +2     
- Partials      751      753    +2     
Files with missing lines Coverage Δ
beets/plugins.py 88.97% <100.00%> (+0.13%) ⬆️
beetsplug/ftintitle.py 89.43% <92.30%> (-1.63%) ⬇️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@treyturner treyturner force-pushed the fix/ftintitle_parenthetical_features branch 5 times, most recently from 8b03a62 to f90d80b Compare June 11, 2026 21:55
Comment thread beetsplug/ftintitle.py Outdated
@treyturner treyturner force-pushed the fix/ftintitle_parenthetical_features branch 3 times, most recently from 0806299 to 6f02b6d Compare June 19, 2026 00:47
@treyturner treyturner force-pushed the fix/ftintitle_parenthetical_features branch from 6f02b6d to c1de81d Compare June 19, 2026 00:47
@treyturner treyturner requested a review from snejus June 19, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ftintitle ftintitle plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ftintitle: parenthetical features are broken

2 participants