putpat/rockstar — pull request #32 by jonaustin (2014-01-12 23:45:43+00:00)
Title: Use last.fm's artist name in artist search result

Issue:
The returned artist name from an artist search is always the name the user
searched for instead of last.fm's artist name.
This is mainly problematic when a search is done using only the musicbrainz id
(nil or empty string for artist name).

Fix:
The resulting Artist.name should always be the one last.fm returns, not the name
the user sent into the search.

Resulting changes (see tests):
1. When an artist lookup using only the MusicBrainz ID (mbid) was returned (i.e.
with a nil artist argument), then the returned Artist.name would always be
nil. Now it will return last.fm's artist name.

2. Outside of the scenario of supplying only the mbid this is mainly an issue of
case. Now if a search is done for 'metaLlicA' it will return 'Metallica' for
the artist.name. This was a side effect of the first fix; it seems like
correct behaviour, but wanted to mention it as it does change previous
behavior that may be expected.