Repository navigation
fix(locallibrary): plugins on folder drives, plugin fields in rules and edits, panel leftovers - #315
Merged
Merged
Conversation
…nd edits, panel leftovers Planned as these commits, folded into one because they share files: - fix(locallibrary): let a plugin hook read the folder drive it runs on, and only while it runs - feat(locallibrary): take analyzers' fields in smart rules, edit selectors and drive sorts - refactor(locallibrary): read the player's analysis and matches through the api - fix(locallibrary): title plugin panels as track show does and ask again when settings change
bnb
previously approved these changes
Oct 30, 2026
SizeCompared with main. KiB are 1,024 bytes.
|
# Conflicts: # apps/locallibrary/CHANGELOG.md # apps/locallibrary/src/tui/plugins.rs # crates/locallibrary/src/plugin/imports.rs # crates/locallibrary/src/plugin/sources.rs
botandbang
enabled auto-merge
November 1, 2026 16:29
bnb
approved these changes
Nov 1, 2026
Contributor
Author
|
Closing and reopening so CI runs against current main (with #353's CodeQL fix). Branch unchanged. |
auto-merge was automatically disabled
November 1, 2026 16:49
Pull request was closed
botandbang
enabled auto-merge
November 1, 2026 16:50
Rust coverageFrom run 36. Both are held to the thresholds in .cargo/config.toml.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Plugin hooks now run on a drive the player (or any command) opened by folder path. A hook's context gives its plugin that drive, under the name the context uses, until the hook ends. Callbacks find it by that name before the drives known here. Paths, other folders, and the folder after the hook are still refused, and paths under it are said from its name. Exports give the drive again while the plugin writes. The player's "only on a plugged-in drive" gating is removed, along with
Target.folder_driveand the panel's unavailable state.Smart playlist rules, edits' track selectors and playlist sorts on the drive take analyzers' fields. The app's
Installedmoved into the library asfields::Installed. Edit planning reads field values when a selector or sort names one, through the hosted plugins and the default store. Rules are validated against the fields the installed plugins declare, when they're added and when they're applied. A field no plugin declares says so, and a filter on a field nothing has been analyzed for warns in the plan. The player's "sort on the drive" works for a plugin column.The player reads a track's analysis and harmonic matches through
api::analysis_ofandapi::matches_in, whichtrack.analysis,track.showandtrack.matchesuse too.Plugin panels in the player show their view's own title after the panel's, as
track showdoes, and are asked for again when their plugin's settings are saved.Fixes LOC-26
Fixes #126
Fixes LOC-25
Fixes #125
Fixes LOC-27
Fixes #127
Fixes LOC-20
Fixes #117
How it was tested
cargo fmt --check, andcargo clippy -p locallibrary -p locallibrary-cli --all-targets -- -D warnings.cargo nextest run -p locallibraryon the plugin, query, smart, edit, fields, analysis, matches and api property tests: 604 pass.cargo nextest run -p locallibrary-clion the player's plugin, props, mix, edits and My Tags tests and the plugin, smart, rpc, edit, tracks and playlist tests: 409 pass.a_hook_on_a_folder_reads_only_that_folder(a real plugin process on a folder outside the volumes; fails with callbacks back onreads.drive), the threeplugins/fields.rstests (all fail with the field reading off), anda_panel_shows_its_views_title_and_follows_its_settings(fails without thestalecall). LOC-27 is a structural change, pinned by the details property comparing againstapi::matches_in.Checklist
apps/locallibrary/CHANGELOG.mdhas a line under Unreleased, if people using it will noticedocs/and--helpstill say what the code does