mirror of
https://github.com/beetbox/beets.git
synced 2026-01-19 14:45:17 +01:00
Artist sort name always present
This commit is contained in:
parent
1e4f2d555f
commit
06efe45612
2 changed files with 2 additions and 4 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = []
|
||||
|
|
|
|||
Loading…
Reference in a new issue