attempt to show songs for artist if not albums are found
authorClinton Ebadi <clinton@unknownlamer.org>
Mon, 27 Apr 2015 04:35:36 +0000 (00:35 -0400)
committerClinton Ebadi <clinton@unknownlamer.org>
Mon, 27 Apr 2015 04:35:36 +0000 (00:35 -0400)
GrooveAPI is only searching for verified albums and there are usually
songs to display when no verified albums are returned.

default.py

index 11e53a7..27fb276 100644 (file)
@@ -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):