special-case albumartist update to avoid undoing inference for as-is imports

This commit is contained in:
Adrian Sampson 2011-09-18 12:22:20 -07:00
parent 9933b5e4df
commit 42e0b6c950

View file

@ -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: