Created attachment 151348 [details] Video where you can see that the preview work but does not show on the file ISO File does not show any preview while on the file STEPS TO REPRODUCE 1. Clone and install https://github.com/Hinara/dolphin-retro-thumbnail (my thumbnailer) 2. Enable it and check that previews are enable for file of ~1.4GB 3. Try to preview a Gamecube iso file OBSERVED RESULT The file preview does not work but the parent folder preview of it inner file does work EXPECTED RESULT That the file preview works as well as SOFTWARE/OS VERSIONS Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.24.4 KDE Frameworks Version: 5.96.0 Qt Version: 5.15.5
Additional Information: It seems to be linked to a MIME-Type detection which partially fail !
I don't see the issue content so I will add it back there. I've got an issue with my custom thumbnailer. I checked it and my thumbnailer work and even produce thumbnail for the parent folder. However, the preview of the file is not displayed on the file in question. The file is a gamecube ISO file. It seems that dolphin use the generic ISO ("raw CD image" MIME:"application/x-cd-image") instead of its dedicated MIME: "application/x-gamecube-rom". "xdg-mime query filetype" does correctly report the file as an "application/x-gamecube-rom". Dolphin seems to inconsistently use both MIME as the preview work on the parent folder but not on the file in question as well as proposed programs are the one for "application/x-cd-image" ignoring totaly the "application/x-gamecube-rom"associated programs.
Created attachment 151361 [details] File properties Type is set to "application/x-iso-image" as well as associated app "Content" field match "application/x-gamecube-image" but associated app are not even proposed nor the preview.
So as far as I am it seems that KCoreDirLister emit items with incorrect mimetype (at least they do not check content, in some case).
Ok so I finally found the cause. This is due to KFileItemModel using setDelayedMimeTypes(true) on its KDirListener. This means that the mimetype is determined by file extension EXCEPT when item are sorted by types. Meaning that my preview does not work when files are sorted by names, but does display when files are sorted by types !! I'm gonna take a look a bit latter to try to see where this can be fix. There still be some other strange behaviour, which I think might be due to more time to execute full mime research on files when in a big folder because for a strange reason the preview and mimetype does work in my download folder without being sorted by types