Skip to content

nightly-72b1118a-ls262

Pre-release
Pre-release

Choose a tag to compare

@LinuxServer-CI LinuxServer-CI released this 10 Apr 18:51
· 10 commits to nightly since this release
bbecae4

CI Report:

https://ci-tests.linuxserver.io/linuxserver/beets/nightly-72b1118a-ls262/index.html

LinuxServer Changes:

Full Changelog: nightly-fd586ef6-ls261...nightly-72b1118a-ls262

Remote Changes:

Support multi-valued fields in rewrite and advancedrewrite plugins (#6518)

Fix rewriting of multi-valued fields (rewrite / advancedrewrite

plugins)

Bug: Both rewrite and advancedrewrite plugins assumed all field
values are scalars, so list-type fields (e.g. genres) were not
rewritten correctly. Additionally, only the first matching rule was ever
applied to a field.


What changed

Core logic (beetsplug/rewrite.py):

  • Introduced a rewrite_value singledispatch function to handle both
    str and list[str] values. For lists, each element is rewritten
    individually.
  • Extracted apply_rewrite_rules as a shared utility — now applies
    all matching rules in config order (previously stopped at the first
    match).

advancedrewrite plugin:

  • Replaced its own inline rule-matching loop with a call to the shared
    apply_rewrite_rules, fixing list field support there too.

Behaviour change — rule application order:

Previously, only the first matching rule was applied. Now, all rules run
in config order, allowing chained rewrites. For example:

rewrite:
    artist .*hendrix.*: hendrix catalog
    artist .*catalog.*: Experience catalog

This now produces "Experience catalog" instead of "hendrix catalog".