Skip to content

refactor(ftintitle): cache config options#6732

Merged
snejus merged 1 commit into
beetbox:masterfrom
treyturner:refactor/ftintitle-cached-config
Jun 13, 2026
Merged

refactor(ftintitle): cache config options#6732
snejus merged 1 commit into
beetbox:masterfrom
treyturner:refactor/ftintitle-cached-config

Conversation

@treyturner

@treyturner treyturner commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Pre-factor for #6726.

Description

Make ftintitle's config @cached_property attributes instead of passing them through the call stack. Modeled after similar recent changes in convert.

Changes

  • Add cached plugin properties for auto, drop, format, keep_in_artist, preserve_album_artist, and custom_words, keeping the existing cached bracket_keywords property I forgot I added a while back.
  • commands(), imported(), ft_in_title(), and update_metadata() are cleaned up to read these directly.
  • Don't read auto during plugin init; the import stage remains registered and imported() checks auto when invoked.

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.)

@github-actions github-actions Bot added the ftintitle ftintitle plugin label Jun 12, 2026
@github-actions

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 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.53%. Comparing base (ad03b35) to head (adc2056).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
beetsplug/ftintitle.py 87.50% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6732      +/-   ##
==========================================
+ Coverage   74.51%   74.53%   +0.02%     
==========================================
  Files         162      162              
  Lines       20822    20832      +10     
  Branches     3298     3298              
==========================================
+ Hits        15515    15527      +12     
+ Misses       4550     4549       -1     
+ Partials      757      756       -1     
Files with missing lines Coverage Δ
beetsplug/ftintitle.py 91.05% <87.50%> (+2.56%) ⬆️
🚀 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 refactor/ftintitle-cached-config branch 2 times, most recently from e9c89e5 to b9e0812 Compare June 12, 2026 16:46
@treyturner treyturner force-pushed the refactor/ftintitle-cached-config branch from b9e0812 to 9965698 Compare June 12, 2026 17:11
@treyturner treyturner marked this pull request as ready for review June 12, 2026 17:28
@treyturner treyturner requested a review from a team as a code owner June 12, 2026 17:28
@github-actions

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.

Comment thread beetsplug/ftintitle.py
Comment thread test/plugins/test_ftintitle.py Outdated
@treyturner treyturner force-pushed the refactor/ftintitle-cached-config branch from 9965698 to 15259df Compare June 12, 2026 23:46
Comment thread beetsplug/ftintitle.py
@snejus snejus force-pushed the refactor/ftintitle-cached-config branch from 15259df to adc2056 Compare June 13, 2026 09:56
@snejus snejus enabled auto-merge June 13, 2026 09:56
@snejus snejus merged commit beff630 into beetbox:master Jun 13, 2026
16 checks passed
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.

2 participants