+
+ # Search for playlists
+ def searchPlaylists(self):
+ query = self._get_keyboard(default="", heading="Search for user's playlists")
+ if (query != ''):
+ playlists = groovesharkApi.getUserPlaylistsEx(query)
+ if (len(playlists) > 0):
+ self._add_playlists_directory(playlists)
+ else:
+ dialog = xbmcgui.Dialog()
+ dialog.ok('Grooveshark XBMC', 'No Grooveshark playlists found.')
+ self.categories()
+ else:
+ self.categories()
+
+ # Search for artists albums
+ def searchArtistsAlbums(self):
+ query = self._get_keyboard(default="", heading="Search for artist's albums")
+ if (query != ''):
+ artists = groovesharkApi.getArtistSearchResults(query, limit = self.artistsearchlimit)
+ if (len(artists) > 0):
+ artist = artists[0]
+ artistID = artist[1]
+ xbmc.log("Found " + artist[0] + "...")
+ albums = groovesharkApi.getArtistAlbums(artistID, limit = self.albumsearchlimit)
+ if (len(albums) > 0):
+ self._add_albums_directory(albums)
+ else:
+ dialog = xbmcgui.Dialog()
+ dialog.ok('Grooveshark XBMC', 'No matching albums.')
+ self.categories()
+ else:
+ dialog = xbmcgui.Dialog()
+ dialog.ok('Grooveshark XBMC', 'No matching artists.')
+ self.categories()
+ else:
+ self.categories()
+