Summary: | MIME type of some local file is never determined except when sorted by types | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | MILAS Robin <milas.robin> |
Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | kfm-devel |
Priority: | NOR | ||
Version: | 22.04.1 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Video where you can see that the preview work but does not show on the file
File properties |
Description
MILAS Robin
2022-08-16 01:20:38 UTC
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 |