Fixed bug where specific releases would not show disambiguation in track title.

Releases should now be WYSIWYG reflection of musicbrainz.org (with the exception of multiple disc releases to be handled next).
This commit is contained in:
theguardian
2013-12-10 13:53:55 -08:00
parent cc61cc5c9f
commit fbb6413287

View File

@@ -486,9 +486,13 @@ def getTracksFromRelease(release):
tracks = []
for medium in release['medium-list']:
for track in medium['track-list']:
try:
track_title = unicode(track['title'])
except:
track_title = unicode(track['recording']['title'])
tracks.append({
'number': totalTracks,
'title': unicode(track['recording']['title']),
'title': track_title,
'id': unicode(track['recording']['id']),
'url': u"http://musicbrainz.org/track/" + track['recording']['id'],
'duration': int(track['length']) if 'length' in track else 0