diff --git a/beets/ui/commands.py b/beets/ui/commands.py index f57d2edb0..88c09a010 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -1128,7 +1128,8 @@ def modify_items(lib, mods, query, write, move, album, confirm): # Show each change. for field, value in fsets.iteritems(): - if _showdiff(field, obj.get(field), value): + if _showdiff(field, obj._get_formatted(field), + obj._format(field, value)): changed.add(obj) # Still something to do? diff --git a/docs/changelog.rst b/docs/changelog.rst index 008f7220c..617def602 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -16,6 +16,10 @@ consequences for all users are: * :ref:`Date-based queries ` are now possible. Try getting every track you added in February 2014 with ``beet ls added:2014-02`` or in the whole decade with ``added:2010..``. Thanks to Stig Inge Lea Bjørnsen. +* The :ref:`modify-cmd` command is now better at parsing and formatting + fields. You can assign to boolean fields like ``comp``, for example, using + either the words "true" or "false" or the numerals 1 and 0. Any + boolean-esque value is normalized to a real boolean. For developers, the short version of the story is that Item and Album objects provide *uniform access* across fixed, flexible, and computed attributes.