From 389ca1d8edaf5997ab9618d5ceadeb083c9fabae Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Mon, 27 Apr 2015 00:35:36 -0400 Subject: [PATCH] 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. --- default.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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): -- 2.20.1