Bug 441090 - Thumbnail manually prepared for unsupported file format does not display
Summary: Thumbnail manually prepared for unsupported file format does not display
Status: REPORTED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: Thumbnails and previews (show other bugs)
Version: 21.08.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-17 15:56 UTC by Jordan de La Houssaye
Modified: 2021-08-17 15:56 UTC (History)
0 users

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


Attachments
a vcard for a duck (195 bytes, text/vcard)
2021-08-17 15:56 UTC, Jordan de La Houssaye
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan de La Houssaye 2021-08-17 15:56:15 UTC
Created attachment 140799 [details]
a vcard for a duck

SUMMARY

In order to develop a new thumbnailer program for vcard file format (.vcf) I tried to manually put a thumbnail in $HOME/.cache/thumbnails/ for a sample file. It didn't show it in Dolphin.

I am not sure if I selected the right product and component for this issue.

STEPS TO REPRODUCE
1. cp ducky.vcf /tmp/ # see attachments
2. wget https://upload.wikimedia.org/wikipedia/commons/b/bf/Bucephala-albeola-010.jpg # an image i want to use as a thumbnail
3. for i in 128x128:normal 256x256:large 512x512:x-large 1024x1024:xx-large; do convert -thumbnail "$(echo "$i"|cut -d ':' -f 1)" Bucephala-albeola-010.jpg "$(echo "$i"|cut -d ":" -f 2)".png; done # prepare thumbnails
4. for i in normal.png large.png x-large.png xx-large.png ; do exiftool -config $HOME/exiftool.config -overwrite_original -ThumbURI="file:///tmp/ducky.vcf" -ThumbMimetype="text/vcf" -ThumbImageWidth-=1536 -ThumbImageHeight-=1024 -ThumbSize=195 -ThumbDocumentPages-=1 -ThumbMTime="$(stat --printf "%Y" ducky.vcf)" "$i"; done # Edit metadata according to freedesktop's specification
5. md5="$(echo -n "file:///tmp/ducky.vcf"|md5sum|cut -d ' ' -f 1)" # find md5 for this file
6. for i in normal large x-large xx-large; do mkdir -p $HOME/.cache/thumbnails/"$i"; cp -a "$i".png $HOME/.cache/thumbnails/"$i"/"$md5".png; done # copy thumbnails where they belong.

OBSERVED RESULT

In dolphin, when I look inside /tmp, my vcard does not have the thumbnail I prepared.

EXPECTED RESULT

I expected to see the thumbnail I prepared for this file, even though it is of a file format for which I have no thumbnailer declared. 
SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Kaos (2021)
(available in About System)
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

In order for exiftool to set these metadata, I prepared a config file with this content in $HOME/exiftool.config:

%Image::ExifTool::UserDefined = (
        'Image::ExifTool::PNG::TextualData' => {
                'Thumb::URI' => {
                        Name => 'ThumbURI',
                        Writeable => 'string' 
                },
                'Thumb::MTime' => {
                        Name => 'ThumbMTime',
                        Writeable => 'integer' 
                },
                'Thumb::Size' => {
                        Name => 'ThumbSize',
                        Writeable => 'integer' 
                },
                'Thumb::Mimetype' => {
                        Name => 'ThumbMimetype',
                        Writeable => 'string' 
                },
                'Thumb::Image::Width' => {
                        Name => 'ThumbImageWidth',
                        Writeable => 'integer' 
                },
                'Thumb::Image::Height' => {
                        Name => 'ThumbImageHeight',
                        Writeable => 'integer' 
                },
                'Thumb::Document::Pages' => {
                        Name => 'ThumbDocumentPages',
                        Writeable => 'integer' 
                },
                'Thumb::Movie::Length' => {
                        Name => 'ThumbMovieLength',
                        Writeable => 'integer' 
                }
        },
);
1; #end