summaryrefslogtreecommitdiffstats
path: root/core/imagedownloader.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/imagedownloader.h')
-rw-r--r--core/imagedownloader.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/imagedownloader.h b/core/imagedownloader.h
index 13ba80746..d5cb889fe 100644
--- a/core/imagedownloader.h
+++ b/core/imagedownloader.h
@@ -2,6 +2,7 @@
#ifndef IMAGEDOWNLOADER_H
#define IMAGEDOWNLOADER_H
+#include "metadata.h"
#include <QImage>
#include <QFuture>
#include <QNetworkReply>
@@ -48,14 +49,24 @@ public slots:
signals:
void thumbnailChanged(QString filename, QImage thumbnail);
private:
+ struct Thumbnail {
+ QImage img;
+ mediatype_t type;
+ };
+
Thumbnailer();
+ static void addThumbnailToCache(const Thumbnail &thumbnail, const QString &picture_filename);
void recalculate(QString filename);
void processItem(QString filename, bool tryDownload);
+ Thumbnail getThumbnailFromCache(const QString &picture_filename);
+ Thumbnail fetchImage(const QString &filename, const QString &originalFilename, bool tryDownload);
+ Thumbnail getHashedImage(const QString &filename, bool tryDownload);
mutable QMutex lock;
QThreadPool pool;
QImage failImage; // Shown when image-fetching fails
QImage dummyImage; // Shown before thumbnail is fetched
+ QImage videoImage; // Place holder for videos
QMap<QString,QFuture<void>> workingOn;
};