AudioAddict: fix artist name retrieval

Sometimes, the artist field is empty
It is then retrieved from the track field
This commit is contained in:
Pierre Mazière 2013-08-29 11:18:04 +02:00 committed by Florent
commit c3a1095f7a

View file

@ -213,6 +213,11 @@ class AudioAddictBackend(BaseBackend, ICapRadio, ICapCollection):
artist = u'' + (channel.get('artist', '') or 'Unknown')
title = u''+(channel.get('title', '') or 'Unknown')
if artist == 'Unknown' :
track=u'' + (channel.get('track', '') or 'Unknown')
if track != 'Unknown' :
artist = track[:track.find(' - ')]
return artist, title
def get_radio(self, radio):