Artist sort name always present

This commit is contained in:
Paul Provost 2012-03-24 19:56:21 -04:00
parent 1e4f2d555f
commit 06efe45612
2 changed files with 2 additions and 4 deletions

View file

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

View file

@ -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 = []