Skip to content

eDit: Enable album-level field editing during interactive import#6727

Open
arsaboo wants to merge 8 commits into
beetbox:masterfrom
arsaboo:edit
Open

eDit: Enable album-level field editing during interactive import#6727
arsaboo wants to merge 8 commits into
beetbox:masterfrom
arsaboo:edit

Conversation

@arsaboo

@arsaboo arsaboo commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Description

During interactive import, the edit plugin only exposed item-level fields — the albumfields configuration was completely ignored in importer_edit(). Users who wanted to modify album-level fields such as album or year had to complete the import, then run beet edit -a QUERY as a separate step.

Solution

Updated importer_edit() to support editing album-level fields during import. Album fields (configured via albumfields) are presented as a YAML header section prepended to the per-track documents. Changes to the header are applied to all items in the album, making album-level edits work in both the eDit and edit Candidates choices.

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

Copilot AI review requested due to automatic review settings June 10, 2026 19:51
@arsaboo arsaboo requested a review from a team as a code owner June 10, 2026 19:51
@github-actions github-actions Bot added the edit edit plugin label Jun 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for editing album-level fields during interactive album imports by introducing a YAML header section, along with refactoring the edit flow and expanding documentation/tests.

Changes:

  • Show albumfields as a YAML header document during interactive album import editing.
  • Refactor YAML editing into _edit_yaml and extend importer edit logic to handle header + per-track documents.
  • Add tests and update docs/changelog to describe the new behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
beetsplug/edit.py Implements album-header YAML + refactors edit loop into _edit_yaml and new importer edit application logic.
test/plugins/test_edit.py Adds tests for album-header editing during import.
docs/plugins/edit.rst Documents the new album-header behavior during interactive import editing.
docs/changelog.rst Announces the new interactive import album-header feature.

Comment thread beetsplug/edit.py
Comment thread beetsplug/edit.py Outdated
Comment thread beetsplug/edit.py
Comment thread beetsplug/edit.py Outdated
Comment thread beetsplug/edit.py
Comment thread beetsplug/edit.py Outdated
Comment thread test/plugins/test_edit.py Outdated
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.41860% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.51%. Comparing base (60047df) to head (4510977).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
beetsplug/edit.py 74.41% 21 Missing and 12 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6727      +/-   ##
==========================================
- Coverage   74.52%   74.51%   -0.01%     
==========================================
  Files         162      162              
  Lines       20818    20916      +98     
  Branches     3295     3319      +24     
==========================================
+ Hits        15515    15586      +71     
- Misses       4547     4566      +19     
- Partials      756      764       +8     
Files with missing lines Coverage Δ
beetsplug/edit.py 80.07% <74.41%> (-5.64%) ⬇️

... and 1 file 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

edit edit plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants