Permalink
Browse files

Merge remote-tracking branch 'jonnyjd/multiple_artists'

Signed-off-by: Alastair Porter <alastair@porter.net.nz>
  • Loading branch information...
2 parents f1335b5 + 8586b56 commit 491277dfc0c1f8d530f45ef3e4490fd893d21c52 @alastair committed May 12, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 examples/releasesearch.py
View
6 examples/releasesearch.py
@@ -21,8 +21,10 @@
def show_release_details(rel):
"""Print some details about a release dictionary to stdout.
"""
- artist_names = [c['artist']['name'] for c in rel['artist-credit']]
- print("{}, by {}".format(rel['title'], ', '.join(artist_names)))
+ # "artist-credit-phrase" is a flat string of the credited artists
+ # joined with " + " or whatever is given by the server.
+ # You can also work with the "artist-credit" list manually.
+ print("{}, by {}".format(rel['title'], rel["artist-credit-phrase"]))
if 'date' in rel:
print("Released {} ({})".format(rel['date'], rel['status']))
print("MusicBrainz ID: {}".format(rel['id']))

0 comments on commit 491277d

Please sign in to comment.