From: Clinton Ebadi Date: Mon, 27 Apr 2015 04:35:36 +0000 (-0400) Subject: attempt to show songs for artist if not albums are found X-Git-Url: https://git.hcoop.net/clinton/xbmc-groove.git/commitdiff_plain/389ca1d8edaf5997ab9618d5ceadeb083c9fabae?ds=sidebyside attempt to show songs for artist if not albums are found GrooveAPI is only searching for verified albums and there are usually songs to display when no verified albums are returned. --- diff --git a/default.py b/default.py index 11e53a7..27fb276 100644 --- a/default.py +++ b/default.py @@ -451,8 +451,12 @@ class Grooveshark: # Show selected artist def artist(self, artistid): albums = groovesharkApi.getArtistAlbums(artistid, limit = self.albumsearchlimit) - self._add_dir(__language__(30016), '', MODE_ARTIST_POPULAR_FROM_ALBUMS, self.popularSongsArtistImg, artistid) - self._add_albums_directory(albums, artistid, True) + if (len(albums) > 0): + self._add_dir(__language__(30016), '', MODE_ARTIST_POPULAR_FROM_ALBUMS, self.popularSongsArtistImg, artistid) + self._add_albums_directory(albums, artistid, True) + else: + # There are likely songs for the artist even when no verified albums are found + self.artistPopularSongs(artistid) # Show selected playlist def playlist(self, playlistid, playlistname):