Commit 4b4380f4 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Thumbnail: Add an Empty origin.

So we can have a clear defined value for a thumbnail that's being
reloaded
parent c80a6356
......@@ -223,7 +223,8 @@ bool Artist::setThumbnail( std::shared_ptr<Thumbnail> thumbnail )
return false;
}
if ( m_thumbnail->origin() == Thumbnail::Origin::Artist ||
m_thumbnail->origin() == Thumbnail::Origin::UserProvided )
m_thumbnail->origin() == Thumbnail::Origin::UserProvided ||
m_thumbnail->origin() == Thumbnail::Origin::Empty )
return m_thumbnail->update( thumbnail->mrl(),
thumbnail->origin(),
thumbnail->isOwned() );
......
......@@ -414,6 +414,7 @@ bool Media::setThumbnail( std::shared_ptr<Thumbnail> thumbnail )
case Thumbnail::Origin::AlbumArtist: // unused for now
case Thumbnail::Origin::Media: // media specific
case Thumbnail::Origin::UserProvided: // Already per-media
case Thumbnail::Origin::Empty: // The thumbnail was reset to be reloaded, update it
// In all these cases, the thumbnail should be per-media, and can
// be safely overriden.
return m_thumbnail->update( thumbnail->mrl(),
......
......@@ -51,7 +51,9 @@ public:
/// A thumbnail provided by the application
UserProvided,
/// An image (jpg or png) that was located in the album folder
CoverFile
CoverFile,
/// A temporarily empty thumbnail, when reloading a media
Empty = 0xFF,
};
Thumbnail( MediaLibraryPtr ml, sqlite::Row& row );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment