[Android] Look for cover in folder in last resort
Geoffrey Métais
git at videolan.org
Tue Sep 8 17:05:30 CEST 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Sep 8 17:03:56 2015 +0200| [d87355f32a3d552942be60eba7d01021dd69b477] | committer: Geoffrey Métais
Look for cover in folder in last resort
Because it's painful and Android often does it
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=d87355f32a3d552942be60eba7d01021dd69b477
---
vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
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 acc1adb..cbd087d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
@@ -316,14 +316,14 @@ public class AudioUtil {
if (coverPath == null || !cacheFile.exists())
coverPath = getCoverFromVlc(context, media);
- // no found yet, looking in folder
- if (coverPath == null || !(new File(coverPath)).exists())
- coverPath = getCoverFromFolder(media);
-
// try to get the cover from android MediaStore
if (coverPath == null || !(new File(coverPath)).exists())
coverPath = getCoverFromMediaStore(context, media);
+ // no found yet, looking in folder
+ if (coverPath == null || !(new File(coverPath)).exists())
+ coverPath = getCoverFromFolder(media);
+
// read (and scale?) the bitmap
cover = readCoverBitmap(coverPath, width);
More information about the Android
mailing list