The thumbnailer for Epub 3.0 does not work properly. The file from IDPF (the spec creators) has no cover in Dolphin, even though one is in the file: https://github.com/IDPF/epub3-samples/releases/download/20170606/epub30-spec.epub STEPS TO REPRODUCE 1. Put the file into Dolphin 2. Enable previews OBSERVED RESULT Generic file icon EXPECTED RESULT Cover from the EPUB file itself. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: 5.24.2 KDE Frameworks Version: 5.91.0 Qt Version: 5.15.3 ADDITIONAL INFORMATION I have done some debugging using the code from https://github.com/KDE/kio-extras/blob/master/thumbnail/ebookcreator.cpp It seems that coverHref is found properly here: https://github.com/KDE/kio-extras/blob/20f476fabfc3f5c50e514c075cea429f62f59652/thumbnail/ebookcreator.cpp#L157 But then the break on the next line skips the assignment itemHrefs[id] = href (this is ok, as we have already found the proper cover file). Nonetheless, in the end, it's the (now broken) itemHrefs map that is used as the source for final coverHref, not the coverHref variable that was meticulously found before: https://github.com/KDE/kio-extras/blob/20f476fabfc3f5c50e514c075cea429f62f59652/thumbnail/ebookcreator.cpp#L203 I suppose that line 203 should rather read: QByteArray encoded = coverHref.toUtf8();
Thanks for your analysis, I believe it is correct, since coverHref is used for the cover it found but then not actually used in the codepath below because of the line you mentioned. Would you be interested in submitting a merge request to fix this on https://invent.kde.org/network/kio-extras
Gladly, but I have no idea where to start (e.g., how to get an account at invent.kde.org).
You can register at identity.kde.org
Git commit 2c05bf836247effdcbfbb4ce13bee3571f4c3dd4 by Albert Astals Cid, on behalf of Michał Goliński. Committed on 07/03/2022 at 14:08. Pushed by aacid into branch 'master'. Use proper cover href for EPUB 3.0 Rationale for change: see comments in https://bugs.kde.org/show_bug.cgi?id=451226 M +1 -1 thumbnail/ebookcreator.cpp https://invent.kde.org/network/kio-extras/commit/2c05bf836247effdcbfbb4ce13bee3571f4c3dd4
*** Bug 452411 has been marked as a duplicate of this bug. ***