diff --git a/beets/autotag/__init__.py b/beets/autotag/__init__.py index 7b20da3b4..b3cf6975a 100644 --- a/beets/autotag/__init__.py +++ b/beets/autotag/__init__.py @@ -301,7 +301,9 @@ def track_distance(item, track_data, track_index=None, incl_artist=False): dist_max += TRACK_TITLE_WEIGHT # Track artist, if included. - if incl_artist: + # Attention: MB DB does not have artist info for all compilations, + # so only check artist distance if there is actually an artist in the MB track data + if incl_artist and 'artist' in track_data: dist += string_dist(item.artist, track_data['artist']) * \ TRACK_ARTIST_WEIGHT dist_max += TRACK_ARTIST_WEIGHT diff --git a/beets/ui/commands.py b/beets/ui/commands.py index 062a204c1..565c8c3f5 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -532,7 +532,6 @@ def apply_choices(lib, copy, write, art, delete, progress): # Only delete files that were actually moved. if old_path not in new_paths: os.remove(library._syspath(old_path)) - os.remove(library._syspath(old_path)) # Update progress. if progress: