Fix #1393: rewrite broken for album-level fields

We now create a computed field for albums as well as items. (This plugin is
very old!)
This commit is contained in:
Adrian Sampson 2015-04-04 16:03:12 -07:00
parent eef82aea59
commit cf39977fbb
2 changed files with 7 additions and 1 deletions

View file

@ -69,4 +69,7 @@ class RewritePlugin(BeetsPlugin):
# Replace each template field with the new rewriter function.
for fieldname, fieldrules in rules.iteritems():
self.template_fields[fieldname] = rewriter(fieldname, fieldrules)
getter = rewriter(fieldname, fieldrules)
self.template_fields[fieldname] = getter
if fieldname in library.Album._fields:
self.album_template_fields[fieldname] = getter

View file

@ -148,6 +148,9 @@ Fixes:
beets.
* :doc:`/plugins/convert`: You can now configure the temporary directory for
conversions. Thanks to :user:`autochthe`. :bug:`1382` :bug:`1383`
* :doc:`/plugins/rewrite`: Fix a regression that prevented the plugin's
rewriting from applying to album-level fields like ``$albumartist``.
:bug:`1393`
For developers: