diff options
Diffstat (limited to 'src/library/coverart.h')
-rw-r--r-- | src/library/coverart.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/library/coverart.h b/src/library/coverart.h index 9a79ecc344..d9179c3d08 100644 --- a/src/library/coverart.h +++ b/src/library/coverart.h @@ -52,6 +52,13 @@ class CoverInfoRelative { CoverInfoRelative(CoverInfoRelative&&) = default; CoverInfoRelative& operator=(CoverInfoRelative&&) = default; + /*non-virtual*/ void reset() { + // Slicing when invoked from a subclass is intended! + // Only the contents of this base class are supposed + // to be reset, i.e. trackLocation should be preserved. + *this = CoverInfoRelative(); + } + Source source; Type type; QString coverLocation; // relative path, from track location @@ -81,6 +88,14 @@ class CoverInfo : public CoverInfoRelative { QImage loadImage( const SecurityTokenPointer& pTrackLocationToken = SecurityTokenPointer()) const; + // Verify the image hash and update it if necessary. + // If the corresponding image has already been loaded it + // could be provided as a parameter to avoid reloading + // if actually needed. + bool refreshImageHash( + const QImage& loadedImage = QImage(), + const SecurityTokenPointer& pTrackLocationToken = SecurityTokenPointer()); + QString trackLocation; }; |