[Android] [PATCH] Download cover art also from http urls

Geoffrey Métais geoffrey at videolan.org
Tue Jun 13 10:12:34 CEST 2017


Http cover arts are already downloaded, call is here:
https://code.videolan.org/videolan/vlc-android/blob/master/vlc-android/src/org/videolan/vlc/gui/helpers/AsyncImageLoader.java#L141
Right before the AudioUtil call actually.

Le lun. 12 juin 2017 à 22:06, Marc K <morckx at gmail.com> a écrit :

> Fixes missing cover art icons for network media.
> ---
>  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..91f5ffa7d 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;
> --
> 2.11.0
>
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20170613/2e51c489/attachment.html>


More information about the Android mailing list