Skip to content

nightly-458390ea-ls24

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 21 Nov 16:15
· 4 commits to nightly since this release

CI

Test report · Build status

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_ALIASES in beetsplug/zero.py containing groups of
    paired and aliased fields (images/art, genre/genres,
    artist/artists, albumartist/albumartists, etc.).
  • When constructing the whitelist keep set, 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.py verifying that
    specifying art, genre, genres, or artist in keep_fields
    preserves the metadata on disk.
  • Added changelog entry in docs/changelog.rst.

Fixes #7069.