mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 13:07:09 +01:00
Fixes a bug when trying to modify the artpath with special characters
Basically, it uses the helpers that handle conversion bytestring <-> unicode with the item's path, but weren't being used with artpath. For now, it just fixes the behavior for `modify`
This commit is contained in:
parent
29546fda5f
commit
87dedaafad
2 changed files with 8 additions and 0 deletions
|
|
@ -381,6 +381,11 @@ def _colordiff(a, b, highlight='red'):
|
|||
else:
|
||||
return colorize(highlight, a), colorize(highlight, b)
|
||||
|
||||
if not isinstance(a, unicode) or not isinstance(b, unicode):
|
||||
# This is probably a path
|
||||
a = util.displayable_path(a)
|
||||
b = util.displayable_path(b)
|
||||
|
||||
a_out = []
|
||||
b_out = []
|
||||
|
||||
|
|
|
|||
|
|
@ -1107,6 +1107,9 @@ def modify_items(lib, mods, query, write, move, album, confirm):
|
|||
key, value = mod.split('=', 1)
|
||||
if key not in allowed_keys:
|
||||
raise ui.UserError('"%s" is not a valid field' % key)
|
||||
|
||||
if key == 'artpath':
|
||||
value = util.bytestring_path(value)
|
||||
fsets[key] = _convert_type(key, value, album)
|
||||
|
||||
# Get the items to modify.
|
||||
|
|
|
|||
Loading…
Reference in a new issue