Skip to content

Commit ea77434

Browse files
Merge pull request #17053 from nextcloud/gallery/fixVideoThumbnail
Gallery: fix video thumnail generation
2 parents d2e8b98 + 96de5eb commit ea77434

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

app/src/main/java/com/nextcloud/client/jobs/gallery/GalleryImageGenerationJob.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,12 @@ class GalleryImageGenerationJob(private val user: User, private val storageManag
119119

120120
onNewThumbnail()
121121

122-
val local = decodeLocalThumbnail(file)
123-
if (local != null) {
124-
ThumbnailsCacheManager.addBitmapToCache(cacheKey, local)
125-
return@withContext applyVideoOverlayIfNeeded(file, local)
122+
if (file.isDown) {
123+
val local = decodeLocalThumbnail(file)
124+
if (local != null) {
125+
ThumbnailsCacheManager.addBitmapToCache(cacheKey, local)
126+
return@withContext applyVideoOverlayIfNeeded(file, local)
127+
}
126128
}
127129

128130
val remote = semaphore.withPermit { fetchFromServer(file) }

0 commit comments

Comments
 (0)