def fetch_album_name(self):
        """
        Get the name of the album from lastfm.
        """
        response = get_lastfm('track.getInfo', artist=self.artist,
                              track=self.title)
        if response:
            try:
                self.album = response['track']['album']['title']
                logger.debug('Found album %s from lastfm', self.album)
            except Exception:
                logger.warning('Could not fetch album name for %s', self)
        else:
            logger.warning('Could not fetch album name for %s', self)
def fetch_album_name ( self ) : response = get_lastfm ( 'track.getInfo' , artist = self . artist , track = self . title ) if response : try : self . album = response [ 'track' ] [ 'album' ] [ 'title' ] logger . debug ( 'Found album %s from lastfm' , self . album ) except Exception : logger . warning ( 'Could not fetch album name for %s' , self ) else : logger . warning ( 'Could not fetch album name for %s' , self )
Get the name of the album from lastfm.