[Android] AudioUtil: No list cover is artist or album are null

Thomas Guillem git at videolan.org
Wed Oct 7 09:26:11 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Oct  7 09:26:03 2015 +0200| [f5ee5259afcdab0cb0b818802ceb75b229750265] | committer: Thomas Guillem

AudioUtil: No list cover is artist or album are null

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=f5ee5259afcdab0cb0b818802ceb75b229750265
---

 vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
index aee7780..7df67b9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
@@ -399,7 +399,10 @@ public class AudioUtil {
         Bitmap cover = null;
         LinkedList<String> testedAlbums = new LinkedList<String>();
         for (MediaWrapper media : list) {
-            if (media.getAlbum() != null && testedAlbums.contains(media.getAlbum()))
+            /* No list cover is artist or album are null */
+            if (media.getAlbum() == null || media.getArtist() == null)
+                continue;
+            if (testedAlbums.contains(media.getAlbum()))
                 continue;
 
             cover = fromMemCache ? AudioUtil.getCoverFromMemCache(context, media, width) : AudioUtil.getCover(context, media, width);



More information about the Android mailing list