From 42e0b6c950dc63751be4a132b609f83d114fc40e Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sun, 18 Sep 2011 12:22:20 -0700 Subject: [PATCH] special-case albumartist update to avoid undoing inference for as-is imports --- beets/ui/commands.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/beets/ui/commands.py b/beets/ui/commands.py index 414bd177b..257df93a4 100755 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -705,6 +705,14 @@ def update_items(lib, query, album, move, color): old_data = dict(item.record) item.read() + # Special-case album artist when it matches track artist. (Hacky + # but necessary for preserving album-level metadata for non- + # autotagged imports.) + if not item.albumartist and \ + old_data['albumartist'] == old_data['artist'] == item.artist: + item.albumartist = old_data['albumartist'] + item.dirty['albumartist'] = False + # Get and save metadata changes. changes = {} for key in library.ITEM_KEYS_META: