Skip to content

Commit 6377a8d

Browse files
committed
Update docs
1 parent 5b22268 commit 6377a8d

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

docs/changelog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ Bug fixes
8080
plural field names. :bug:`6483`
8181
- :doc:`plugins/fetchart`: Error when a configured source does not exist or
8282
sources configuration is empty. :bug:`6336`
83+
- :doc:`plugins/rewrite` :doc:`plugins/advancedrewrite`: Fix rewriting
84+
multi-valued fields such as ``genres`` by applying rules to each matching list
85+
entry. :bug:`6515`
8386

8487
For plugin developers
8588
~~~~~~~~~~~~~~~~~~~~~

docs/plugins/advancedrewrite.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ replace a single field:
2828
advancedrewrite:
2929
- artist ODD EYE CIRCLE: 이달의 소녀 오드아이써클
3030

31+
As with :doc:`/plugins/rewrite`, simple rules applied to a multi-valued field
32+
rewrite only the matching list entries.
33+
3134
The advanced syntax consists of a query to match against, as well as a map of
3235
replacements to apply. For example, to credit all songs of ODD EYE CIRCLE before
3336
2023 to their original group name, you can use the following rule:

docs/plugins/rewrite.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ might use:
3030
rewrite:
3131
artist .*jimi hendrix.*: Jimi Hendrix
3232

33+
Rules also apply to matching elements in multi-valued fields. For example, this
34+
rewrites the ``rock`` entry in ``genres`` while leaving other genre values
35+
unchanged:
36+
37+
::
38+
39+
rewrite:
40+
genres rock: Classic Rock
41+
3342
As a convenience, the plugin applies patterns for the ``artist`` field to the
3443
``albumartist`` field as well. (Otherwise, you would probably want to duplicate
3544
every rule for ``artist`` and ``albumartist``.)

0 commit comments

Comments
 (0)