[Android] Prevent trying to save thumbs for non ML medias

Nicolas Pomepuy git at videolan.org
Fri Sep 2 06:04:42 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Aug 12 08:06:32 2022 +0200| [bd360920f1e7dd46c85d6b9c70307872397b4857] | committer: Nicolas Pomepuy

Prevent trying to save thumbs for non ML medias

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

 application/vlc-android/src/org/videolan/vlc/util/ThumbnailsProvider.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/util/ThumbnailsProvider.kt b/application/vlc-android/src/org/videolan/vlc/util/ThumbnailsProvider.kt
index 7b6aaa875..63399d5db 100644
--- a/application/vlc-android/src/org/videolan/vlc/util/ThumbnailsProvider.kt
+++ b/application/vlc-android/src/org/videolan/vlc/util/ThumbnailsProvider.kt
@@ -95,7 +95,7 @@ object ThumbnailsProvider {
             BitmapCache.addBitmapToMemCache(getMediaCacheKey(true, media, width.toString()), bitmap)
             if (hasCache) {
                 media.setThumbnail(thumbPath)
-                BitmapUtil.saveOnDisk(bitmap, thumbPath)
+                if (media.id > 0) BitmapUtil.saveOnDisk(bitmap, thumbPath)
                 media.artworkURL = thumbPath
             }
         } else if (media.id != 0L) {



More information about the Android mailing list