[Android] Revert "ImageLoader: Skip network files"

Geoffrey Métais git at videolan.org
Thu Jan 24 10:26:52 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jan 24 09:56:26 2019 +0100| [23356d7a60a7703262af7249321c83bbbb237a0b] | committer: Geoffrey Métais

Revert "ImageLoader: Skip network files"

This reverts commit d8eb796bf13e4ba5d93542543dc724db4d6ff3c7.

> https://code.videolan.org/videolan/vlc-android/commit/23356d7a60a7703262af7249321c83bbbb237a0b
---

 vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt b/vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt
index 52e10d00a..73b225f56 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/ImageLoader.kt
@@ -36,10 +36,8 @@ fun loadImage(v: View, item: MediaLibraryItem?) {
             || item.itemType == MediaLibraryItem.TYPE_GENRE
             || item.itemType == MediaLibraryItem.TYPE_PLAYLIST)
         return
+    val binding = DataBindingUtil.findBinding<ViewDataBinding>(v)
     val isMedia = item.itemType == MediaLibraryItem.TYPE_MEDIA
-    if (isMedia && (item as MediaWrapper).uri.scheme != "file") {
-        return
-    }
     val isGroup = isMedia && (item as MediaWrapper).type == MediaWrapper.TYPE_GROUP
     val isFolder = !isMedia && item.itemType == MediaLibraryItem.TYPE_FOLDER;
     val cacheKey = when {
@@ -48,7 +46,6 @@ fun loadImage(v: View, item: MediaLibraryItem?) {
         else -> ThumbnailsProvider.getMediaCacheKey(isMedia, item)
     }
     val bitmap = if (cacheKey !== null) sBitmapCache.getBitmapFromMemCache(cacheKey) else null
-    val binding = DataBindingUtil.findBinding<ViewDataBinding>(v)
     if (bitmap !== null) updateImageView(bitmap, v, binding)
     else AppScope.launch { getImage(v, findInLibrary(item, isMedia, isGroup), binding) }
 }



More information about the Android mailing list