diff --git a/src/library/coverartcache.cpp b/src/library/coverartcache.cpp index e7e9dc23fbca..dd82760cb173 100644 --- a/src/library/coverartcache.cpp +++ b/src/library/coverartcache.cpp @@ -57,7 +57,7 @@ void CoverArtCache::requestCover( pRequester, pTrack, coverInfo, - desiredWidth, // original size + desiredWidth, Loading::Default); } @@ -103,6 +103,23 @@ QPixmap CoverArtCache::getCachedCover( return pixmap; } +// static +void CoverArtCache::requestUncachedCover( + const QObject* pRequester, + const CoverInfo& coverInfo, + int desiredWidth) { + CoverArtCache* pCache = CoverArtCache::instance(); + VERIFY_OR_DEBUG_ASSERT(pCache) { + return; + } + pCache->tryLoadCover( + pRequester, + TrackPointer(), + coverInfo, + desiredWidth, + Loading::Default); +} + QPixmap CoverArtCache::tryLoadCover( const QObject* pRequester, const TrackPointer& pTrack, diff --git a/src/library/coverartcache.h b/src/library/coverartcache.h index 2fa16f031b5d..331e51c089a4 100644 --- a/src/library/coverartcache.h +++ b/src/library/coverartcache.h @@ -29,6 +29,11 @@ class CoverArtCache : public QObject, public Singleton { const CoverInfo& coverInfo, int desiredWidth); + static void requestUncachedCover( + const QObject* pRequester, + const CoverInfo& coverInfo, + int desiredWidth); + enum class Loading { CachedOnly, NoSignal,