[Android] Download cover art also from http urls

Marc K git at videolan.org
Fri Jun 16 16:36:02 CEST 2017


vlc-android | branch: master | Marc K <morckx at gmail.com> | Mon Jun 12 22:05:04 2017 +0200| [337231bf1fd2c727c98d13c38892c4e2d5a383ff] | committer: Geoffrey Métais

Download cover art also from http urls

Fixes missing cover art icons for network media.

Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>

> https://code.videolan.org/videolan/vlc-android/commit/337231bf1fd2c727c98d13c38892c4e2d5a383ff
---

 vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.java b/vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.java
index d8bbe9845..864890295 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.java
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.java
@@ -380,6 +380,8 @@ public class AudioUtil {
     public static Bitmap readCoverBitmap(String path, int width) {
         if (path == null)
             return null;
+        if (path.startsWith("http"))
+            return HttpImageLoader.downloadBitmap(path);
         if (path.startsWith("file"))
             path = path.substring(7);
         Bitmap cover = null;



More information about the Android mailing list