Youtube (and by extension youtube-dl) recently started to give thumbnails in the *.webp format, instead of the *.jpg format. If you try to load the *.webp files into a gdk.Pixbuf using the gdk.PixbufNewFromFile() function you get an error:
Couldn’t recognize the image file format for file “4kberLzSvx0.webp”
You mean load the file as you load any binary file, and then convert it to an Image using the decode method in the webp-package, and from there to a PixBuf? I did not think of doing that, but I will try it…
My backup solution, will be to to do something like that (but I will save it as a jpg and keep it until the user deletes the video, instead of deleting it immediately), but I would prefer to just read the webp, and not have to do the conversion thing. Hopefully the GoTK3-gang will suggest a solution, where I don’t need to convert. There might already be a function for that, that I just don’t know about.