Choice of artist image using Last FM as source. TODO: Create preference for source choice

This commit is contained in:
CappielloAntonio 2021-12-05 15:39:19 +01:00
parent 5e15648157
commit e741cc2ea8
4 changed files with 27 additions and 4 deletions

View file

@ -87,7 +87,13 @@ public class ArtistCatalogueAdapter extends RecyclerView.Adapter<ArtistCatalogue
holder.textArtistName.setText(MusicUtil.getReadableString(artist.getName()));
CustomGlideRequest.Builder
.from(context, artist.getId(), CustomGlideRequest.ARTIST_PIC, null)
.from(
context,
artist.getId(),
// CustomGlideRequest.ARTIST_PIC,
artist.getImageUrl(),
null
)
.build()
.transform(new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.cover);

View file

@ -57,7 +57,12 @@ public class ArtistHorizontalAdapter extends RecyclerView.Adapter<ArtistHorizont
}
CustomGlideRequest.Builder
.from(context, artist.getId(), CustomGlideRequest.ARTIST_PIC, null)
.from(
context, artist.getId(),
// CustomGlideRequest.ARTIST_PIC,
artist.getImageUrl(),
null
)
.build()
.transform(new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.cover);

View file

@ -49,7 +49,13 @@ public class ArtistSimilarAdapter extends RecyclerView.Adapter<ArtistSimilarAdap
holder.textArtistName.setText(MusicUtil.getReadableString(artist.getName()));
CustomGlideRequest.Builder
.from(context, artist.getId(), CustomGlideRequest.ALBUM_PIC, null)
.from(
context,
artist.getId(),
// CustomGlideRequest.ARTIST_PIC,
artist.getImageUrl(),
null
)
.build()
.transform(new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.cover);

View file

@ -120,7 +120,13 @@ public class ArtistPageFragment extends Fragment {
if (bind != null) bind.bioMoreTextViewClickable.setVisibility(artist.getLastfm() != null ? View.VISIBLE : View.GONE);
CustomGlideRequest.Builder
.from(requireContext(), artistPageViewModel.getArtist().getId(), CustomGlideRequest.ARTIST_PIC, /*artist.getImageUrl()*/ null)
.from(
requireContext(),
artistPageViewModel.getArtist().getId(),
// CustomGlideRequest.ARTIST_PIC,
artist.getImageUrl(),
null
)
.build()
.into(bind.artistBackdropImageView);