Log the new value

This commit is contained in:
RollingStar 2019-10-30 20:29:32 -04:00 committed by GitHub
parent 25e55a88a3
commit 59dec3f4da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -419,11 +419,13 @@ class FormattedItemMapping(dbcore.db.FormattedMapping):
# This is helpful in path formats when the album artist is unset
# on as-is imports.
if key == 'artist' and not value:
log.debug('No artist, using album artist {0}'.format(value))
return self._get('albumartist')
new_value = self._get('albumartist')
log.debug('No artist, using album artist {0}'.format(new_value))
return new_value
elif key == 'albumartist' and not value:
log.debug('No albumartist, using artist {0}'.format(value))
return self._get('artist')
new_value = self._get('artist')
log.debug('No albumartist, using artist {0}'.format(new_value))
return new_value
else:
return value