[Android] AudioUtil: try to fix cover arts finding

Jean-Baptiste Kempf git at videolan.org
Fri Jun 12 16:58:51 CEST 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Jun 12 15:38:11 2015 +0200| [6b7ff9b17690f82e4c568388d8936de99b107af9] | committer: Jean-Baptiste Kempf

AudioUtil: try to fix cover arts finding

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

 vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java |    3 ++-
 1 file changed, 2 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 6e16fc9..cf3e02d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
@@ -243,9 +243,10 @@ public class AudioUtil {
         int index = f.getName().lastIndexOf('.');
         if (index > 0) {
             final String name = f.getName().substring(0, index);
+            final String ext  = f.getName().substring(index);
             File[] files = folder.listFiles(new FilenameFilter() {
                 public boolean accept(File dir, String filename) {
-                    return filename.startsWith(name);
+                    return filename.startsWith(name) && Arrays.asList(imageExt).contains(ext);
                 }
             });
             if (files.length > 0)



More information about the Android mailing list