+ # Show popular songs of the artist
+ def artistPopularSongs(self):
+ query = self._get_keyboard(default="", heading="Artist")
+ if (query != ''):
+ artists = groovesharkApi.getArtistSearchResults(query, limit = self.artistsearchlimit)
+ if (len(artists) > 0):
+ artist = artists[0]
+ artistID = artist[1]
+ xbmc.log("Found " + artist[0] + "...")
+ songs = groovesharkApi.getArtistPopularSongs(artistID, limit = self.songsearchlimit)
+ if (len(songs) > 0):
+ self._add_songs_directory(songs, trackLabelFormat=NAME_ALBUM_ARTIST_LABEL)
+ else:
+ dialog = xbmcgui.Dialog()
+ dialog.ok('Grooveshark XBMC', 'No popular songs.')
+ self.categories()
+ else:
+ dialog = xbmcgui.Dialog()
+ dialog.ok('Grooveshark XBMC', 'No matching artists.')
+ self.categories()
+ else:
+ self.categories()
+