diff --git a/TODO b/TODO index 15a6fcdb2..d5ce24484 100644 --- a/TODO +++ b/TODO @@ -3,4 +3,3 @@ - anchors (a filepos=) - decryption for DRMed files (may be impossible and/or illegal) - strigi analyzer -- thumbnail generator does not for some files (DRMed i think) diff --git a/mobipocket.cpp b/mobipocket.cpp index 148b7375b..1fb046226 100644 --- a/mobipocket.cpp +++ b/mobipocket.cpp @@ -272,7 +272,13 @@ bool Document::hasDRM() const QImage Document::thumbnail() const { if (!d->firstImageRecord) d->findFirstImage(); - return d->getImageFromRecord(d->thumbnailIndex+d->firstImageRecord); + QImage img=d->getImageFromRecord(d->thumbnailIndex+d->firstImageRecord); + // does not work, try first image + if (img.isNull() && d->thumbnailIndex) { + d->thumbnailIndex=0; + img=d->getImageFromRecord(d->firstImageRecord); + } + return img; } }