feat(ftintitle): hook metadata events, fixing mbsync#6726
Conversation
38e0446 to
8839b95
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6726 +/- ##
==========================================
+ Coverage 74.54% 74.62% +0.07%
==========================================
Files 162 162
Lines 20832 20909 +77
Branches 3298 3313 +15
==========================================
+ Hits 15529 15603 +74
+ Misses 4548 4547 -1
- Partials 755 759 +4
🚀 New features to boost your workflow:
|
ff4a62f to
06da57e
Compare
06da57e to
9e8f19c
Compare
snejus
left a comment
There was a problem hiding this comment.
Let's split the following into a separate PR:
Define each configuration option as a @cached_property to remove the need to send them through each function. See 34772d2 where I did the same for convert plugin.
This will remove a big chunk of the current PR diff and make it easier to review the functionality that you added.
3719e23 to
ff085e4
Compare
|
The cached properties are now in #6732 on which this PR is based. The remaining changes can be seen in the single subsequent commit: |
ff085e4 to
7bfb1a7
Compare
Pre-factor for #6726. 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.
|
Now rebase it on master and I'll review it again :) |
7bfb1a7 to
7b4d06a
Compare
Depends on #6732.
Summary
This PR integrates
ftintitlewith metadata fetched through beets’ metadata-received events, so commands likembsyncapply already-normalized metadata whenftintitleis enabled.Addresses #1153.
Changes
ftintitlelisteners fortrackinfo_receivedandalbuminfo_receivedwhenftintitle.autois enabled.TrackInfometadata beforembsyncapplies it, avoiding unnecessary re-sync churn.artist_credit, cachedInfoproperties, empty titles, and no-op configurations consistently.ftintitledocs for the expandedautobehavior.To Do
docs/to describe it.)docs/changelog.rstto the bottom of one of the lists near the top of the document.)