Bug 402721 - Thumbnails in XDG thumbnailer spec compliant places are ignored by Dolphin
Summary: Thumbnails in XDG thumbnailer spec compliant places are ignored by Dolphin
Status: RESOLVED WORKSFORME
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: Thumbnails and previews (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-31 06:03 UTC by probono
Modified: 2019-03-19 21:26 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Existing XDG thumbnails are being ignored by Dolphin (110.38 KB, image/png)
2018-12-31 06:03 UTC, probono
Details

Note You need to log in before you can comment on or make changes to this bug.
Description probono 2018-12-31 06:03:28 UTC
Created attachment 117196 [details]
Existing XDG thumbnails are being ignored by Dolphin

SUMMARY
Thumbnails in XDG thumbnailer spec compliant places are ignored by Dolphin

STEPS TO REPRODUCE
1. Put thumbnails into XDG thumbnailer spec compliant places, https://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-0.8.0.html
2. See if the thumbnails are displayed
3. There is no step three

OBSERVED RESULT
XDG thumbnailer spec compliant thumbnails are ignored by Dolphin

EXPECTED RESULT
XDG thumbnailer spec compliant thumbnails are displayed by Dolphin

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.14.80
KDE Plasma Version: What is the difference to the above?
KDE Frameworks Version: 5.14.0
Qt Version: 5.11.2
Dolphin Version: 19.03.70

ADDITIONAL INFORMATION
The thumbnails (in this case) are generated by appimaged. Other desktops (such as Xfce) show them just fine
https://github.com/AppImage/appimaged
Comment 1 Nate Graham 2018-12-31 12:48:03 UTC
What happens if you copy those AppImages to somewhere in ~? Do they get thumbnails?
Comment 2 probono 2019-01-11 19:05:13 UTC
No, they don't. It looks like Dolphin does not follow the XDG thumbnailer spec at all, or am I wrong?
Comment 3 Nate Graham 2019-01-11 19:12:51 UTC
It is supposed to, so this is a bug somewhere.
Comment 4 Friedrich W. H. Kossebau 2019-01-11 19:50:49 UTC
Probono, can you give a concrete example of a thumbnail file and where you put it? Did you expect the file manager to pick up the new thumbnail automatically?
What have been your file manager display settings ("Preview enabled")?
Comment 5 probono 2019-01-11 21:37:39 UTC
Thanks azubieta for the following test case:

wget -c "http://icons.iconarchive.com/icons/custom-icon-design/mono-general-3/256/home-icon.png" -O ~/.cache/thumbnails/normal/646c2e0867c1bdd38aa5876337af2284.png
touch /tmp/file
xdg-open  /tmp/

A file manager that follows the XDG thumbnail spec will show a "home" icon thumbnail for /tmp/file.

Thanks kossebau for the following analysis:

It seems like Dolphin only shows thumbnails that it knows the thumbnailer which generated them:

https://cgit.kde.org/kio-extras.git/tree/thumbnail/thumbnail.cpp#n697 ff.

https://cgit.kde.org/kio-extras.git/tree/thumbnail/thumbnail.cpp#n90

"enabledPlugins - a list of enabled thumbnailer plugins. PreviewJob does not call this thumbnail slave when a given plugin isn't enabled."

This may be the root cause of this issue.
Comment 6 probono 2019-01-11 21:48:39 UTC
For comparison, in Xfce

wget -c "http://icons.iconarchive.com/icons/custom-icon-design/mono-general-3/256/home-icon.png" -O ~/.cache/thumbnails/normal/646c2e0867c1bdd38aa5876337af2284.png
touch /tmp/file
xdg-open  /tmp/

I do see a "home" icon thumbnail for /tmp/file.
Comment 7 Rog131 2019-01-12 04:13:12 UTC
By Thumbnail Managing Standard: https://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-0.8.0.html

-> 5.2. Thumbnail Attributes: https://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-0.8.0.html#ADDINFOS

"The following keys and their appropriate values must be provided by every program which supports this standard...

Table 1. Required attributes.
Thumb::URI The absolute canonical uri for the original file.
Thumb::MTime The modification time of the original file!

If you just add an image to the cache it won't have those.
Comment 8 Rog131 2019-01-12 04:17:20 UTC
... you could add the attributes with the exiftool.
Comment 9 Christoph Feck 2019-02-08 15:10:21 UTC
Can you confirm that adding the required attributes (see comment #7 with references to the XDG Thumbnail Managing Standard) resolved the issue?
Comment 10 Bug Janitor Service 2019-02-23 04:33:08 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Bug Janitor Service 2019-03-10 04:33:10 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 12 TheAssassin 2019-03-19 21:26:28 UTC
Been talking to @kbroulik and the main reason KIO ignores thumbnails is not the lack of these extended attributes, but KIO not showing thumbnails for files it doesn't have (enabled) thumbnailers for. The logic seems to be "no thumbnailer in the list -> thumbnailer must be disabled", the use case "thumbnailer doesn't exist" isn't covered. Now, you might think "okay, then let's change that and add a 'fallback' thumbnailer that looks for existing thumbnails and can make use of them when there's no thumbnailer at all", but that wouldn't really solve the issue either, since we have a _proper_ AppImage thumbnailer and don't have to rely on the thumbs AppImages create.

Therefore: not worth the effort.

On the AppImage side, adding these attributes to thumbnails is a non-trivial task that will bloat our runtime and will add dependencies. Therefore: also not worth the effort.