Repository navigation
nightly-458390ea-ls24
Pre-release
Pre-release
·
4 commits
to nightly
since this release
CI
LinuxServer changes
Full Changelog: nightly-e333038d-ls23...nightly-458390ea-ls24
Upstream changes
Source: beetbox/beets@458390e
zero: preserve paired and aliased fields when using keep_fields (#7069) (#7077)
Problem
When using the zero plugin in whitelist mode (keep_fields), paired
and aliased fields in MediaFile (such as genre and genres,
artist and artists, etc.) were not treated as aliases. If a user
specified keep_fields: [genres], the singular genre field was not in
the keep set and was queued to be nulled. Writing genre = None to the
underlying MediaFile wiped out the genre metadata on disk.
Symmetrically, specifying genre in keep_fields resulted in genres
being zeroed, as reported in #7069.
Solution
- Define
FIELD_ALIASESinbeetsplug/zero.pycontaining groups of
paired and aliased fields (images/art,genre/genres,
artist/artists,albumartist/albumartists, etc.). - When constructing the whitelist
keepset, expand it to include all
members of any alias group for which at least one member is listed in
keep_fields. - Added regression tests in
test/plugins/test_zero.pyverifying that
specifyingart,genre,genres, orartistinkeep_fields
preserves the metadata on disk. - Added changelog entry in
docs/changelog.rst.
Fixes #7069.