In a fresh VLC installation where Let VLC scan my device for media content has been unticked, thumbnails are shown erratically.
All settings (except for the scanning functionality) are left as default.
In the Browse view, when a directory is first entered, thumbnails are generated as expected. However, after leaving and re-entering the directory, thumbnails are no longer visible, and often won't be re-generated again in a long while.
Context
App version
This is a long standing issue. VLC-Android-3.5.0-RC-2-armv8-20220710-0118.apk (current latest) shows the problem.
Android version
Android 12
Device model
moto g100
Designs
Child items
...
Linked items
0
Link issues together to show that they're related.
Learn more.
It seems indeed that the fix (5dce5a96) is not sufficient. I tested that quickly and it has to do with the BrowserProvider inconsistently generating MediaWrapper::artworkMrl between different navigation sessions and messing up with ThumbnailsProvider::getMediaThumbnailPath
I've been testing the last nightly build, which seems to improve things considerably.
Although it's a lot harder now, it is still possible to get missing thumbnails:
I can't provide proper reproduction steps; it feels to fail when entering the first directory after having had VLC app in the background.
It seems that moving the VLC app to the background while in a directory that legitimately doesn't have any thumbnails may be triggering the issue (or making it more likely), causing the thumbnails of the next entered directory to fail. There could be some randomness involved too.
Scrolling down to refresh does not fix the missing thumbnails. Toggling between directories may or may not fix them (but it will eventually fix it after a few tries).
Unfortunately, your reproductions steps are indeed vague. On your screenshot, it seems your are talking about local files. Are these files indexed (present in the Video tab)?
These are local files indeed. The Video tab is totally empty. In my setup, Let VLC scan my device for media content is turned off (sames as in the original description in this issue).
After further testing, it seems the issue can be easily reproduced when quickly switching between tasks:
Note that it takes two switches before it breaks. In the video, the following actions are applied:
User enters the /Movies directory; thumbnails are generated as expected.
User enters the /Movies/Screenrecord directory (which happens to be empty).
User switches to the Calculator app.
User switches back to the VLC app.
User goes up one level to the /Movies directory; thumbnails are generated again (unsure if expected).
User enters the /Movies/Screenrecord directory again.
User switches to the Calculator app.
User switches back to the VLC app.
User goes up one level to the /Movies directory; thumbnails are not generated anymore.
It's not shown in the video, but pulling down to refresh the view does not help. Switching between directories does help (but sometimes it may take a few tries, apparently).
To wrap up with this issue, thumbnails always need to be regenerated after having the VLC app in the background but, with the latest fix, at least they are regenerated now in all cases*. Perhaps this is by design? A way to purge the cache between runs?
(*) I happen to have a number of .avi files whose thumbnails are only generated after playing the file. This could be an issue with the core library, and not necessarily with the Android app.
To be exact what happened in that case is the following:
we try to avoid at all costs to refresh the file list (because it can be long to do so in some circumstances)
for indexed medias (medias in the medialibrary) the thumbnail is cached twice: once in the RAM, once on the disk. The file object (of the file list) has a field that stores the thumbnail's path
for non indexed medias, the thumbnail is only cached in the RAM. The bug was that once the app generated it, we also added an incorrect file path to the file object
When you leave the app, the system detects it and if you're low on RAM, it tell the app to do some clean up. Thumbnails in the RAM are taking a lot of memory, so we clear the memory cache
When you come back, if you visually refresh the list by changing folder, the app tries to restore the thumbnail. First, it looks in the memory cache, that is empty. Then, it looks for a thumbnail file path and finds it. So it tried to load it but failed.
The fix was only not to save an incorrect file path if the app doesn't save the thumbnail.
About your .avi files, maybe you can send me one so I can see what happens.