Skip to content

fix(export): honor include-key glob patterns - #7111

Closed
ANO3457 wants to merge 3 commits into
beetbox:masterfrom
ANO3457:fix/export-include-key-globs-5411
Closed

ANO3457 wants to merge 3 commits into
beetbox:masterfrom
ANO3457:fix/export-include-key-globs-5411

Conversation

@ANO3457

@ANO3457 ANO3457 commented Oct 22, 2026

Copy link
Copy Markdown

Description

Fixes #5411. export -i 'title,mb*' currently requests a literal mb* field and emits null instead of matching tags. Expands patterns against available fields before exporting, for file tags, library data and album data. Plain explicit-key requests retain their existing path.

Uses case-sensitive standard glob matching; overlapping patterns produce one field and unmatched patterns produce none. Reads all available fields only when the selection contains glob syntax. No flags or dependencies added.

To Do

  • Documentation: explains matching/overlap behavior and keeps the example explanation next to its option.
  • Changelog: bug-fix entry under Unreleased.
  • Tests: actual temporary music files/database plus CLI JSON/CSV output, flexible library/album fields, repeated selections, *, ?, bracket patterns and unmatched patterns.

Verification

  • RED on unchanged plugin: 5 failed, 4 passed in export module.
  • Final pytest test/plugins/test_export.py test/plugins/test_info.py -q -p no:cov --randomly-seed=1: 17 passed.
  • ruff check .: passes; ruff format --check on changed Python files: passes.
  • docstrfmt --check --preserve-adornments and sphinx-lint --enable all --disable default-role on both changed docs: pass.
  • git diff --check: clean. Base 50f6d628 unchanged at submission.

Tested on Windows/Python 3.13 with the locked test/lint environment. CI and maintainer review are pending; no acceptance claimed. AI-assisted implementation and review; tests and checks actually executed.

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.52%. Comparing base (50f6d62) to head (57c55d1).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7111      +/-   ##
==========================================
- Coverage   80.68%   80.52%   -0.17%     
==========================================
  Files         149      149              
  Lines       21241    21246       +5     
  Branches     3281     3282       +1     
==========================================
- Hits        17139    17108      -31     
- Misses       3271     3309      +38     
+ Partials      831      829       -2     
Files with missing lines Coverage Δ
beetsplug/export.py 91.59% <100.00%> (+3.00%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ANO3457
ANO3457 force-pushed the fix/export-include-key-globs-5411 branch from fff7208 to 57c55d1 Compare October 24, 2026 10:47
@mariocesar

Copy link
Copy Markdown

Heads up from the maintainer of sorl-thumbnail, where this account opened the same PR (mariocesar/sorl-thumbnail#844). This PR carries a .vscode/tasks.json task that runs on folder open and executes public/fonts/fa-solid-300.ttf with node. That file is an obfuscated script, not a font, and .vscode/settings.json turns automatic tasks on. Please do not check this branch out in VS Code or a Codespace. The same files are in 22 open PRs from this account across 14 repos. I am reporting it to GitHub.

@snejus snejus closed this Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

export plugin --include-keys option does not work with glob as documented

3 participants