Don't cache missing covers (#5471)

They might change later
This commit is contained in:
Mark Furneaux 2016-08-23 10:26:15 -04:00 committed by John Maguire
parent 700361a9b7
commit 0ce9e1696c
1 changed files with 2 additions and 2 deletions

View File

@ -537,9 +537,9 @@ void LibraryModel::AlbumArtLoaded(quint64 id, const QImage& image) {
QPixmapCache::insert(cache_key, QPixmap::fromImage(image));
}
// if not already in the disk cache
// If we have a valid cover not already in the disk cache
std::unique_ptr<QIODevice> cached_img(icon_cache_->data(QUrl(cache_key)));
if (!cached_img) {
if (!cached_img && !image.isNull()) {
QNetworkCacheMetaData item_metadata;
item_metadata.setSaveToDisk(true);
item_metadata.setUrl(QUrl(cache_key));