Query API for artists when searching.
This commit is contained in:
parent
692ccda94c
commit
aca0ea697a
5 changed files with 29 additions and 18 deletions
|
|
@ -63,7 +63,7 @@ public class MusicUtil {
|
|||
|
||||
@NonNull
|
||||
public static String getArtistInfoString(@NonNull final Context context, @NonNull final Artist artist) {
|
||||
return artist.genres.size() != 0 ? artist.genres.get(0).name : artist.id;
|
||||
return artist.genres.size() != 0 ? artist.genres.get(0).name : "";
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
|
|
|||
|
|
@ -139,8 +139,7 @@ public class QueryUtil {
|
|||
});
|
||||
}
|
||||
|
||||
public static void getArtists(MediaCallback callback) {
|
||||
ArtistsQuery query = new ArtistsQuery();
|
||||
public static void getArtists(ArtistsQuery query, MediaCallback callback) {
|
||||
query.setFields(new ItemFields[]{ItemFields.Genres});
|
||||
applyProperties(query);
|
||||
App.getApiClient().GetAlbumArtistsAsync(query, new Response<ItemsResult>() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue