From 06efe456124a8f8995e203f64239c6af0cdde780 Mon Sep 17 00:00:00 2001 From: Paul Provost Date: Sat, 24 Mar 2012 19:56:21 -0400 Subject: [PATCH] Artist sort name always present --- beets/autotag/hooks.py | 3 +-- beets/autotag/mb.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/beets/autotag/hooks.py b/beets/autotag/hooks.py index 849021688..a03e79706 100644 --- a/beets/autotag/hooks.py +++ b/beets/autotag/hooks.py @@ -86,8 +86,7 @@ class TrackInfo(object): self.length = length self.medium = medium self.medium_index = medium_index - if artist_sort_name != '': - self.artist_sort_name = artist_sort_name + self.artist_sort_name = artist_sort_name # Aggregation of sources. diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py index 2a4caf8e9..1accb2d0a 100644 --- a/beets/autotag/mb.py +++ b/beets/autotag/mb.py @@ -63,6 +63,7 @@ def track_info(recording, medium=None, medium_index=None): if 'artist-credit' in recording: artist = recording['artist-credit'][0]['artist'] info.artist_id = artist['id'] + info.artist_sort_name = artist['sort-name'] if recording.get('length'): info.length = int(recording['length'])/(1000.0) @@ -94,8 +95,6 @@ def album_info(release): artist_sort_parts.append(el['artist']['sort-name']) artist_name = ''.join(artist_parts) artist_sort_name = ', '.join(artist_sort_parts) - if artist_sort_name == artist_name: - artist_sort_name = '' # Basic info. track_infos = []