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

IMediaLibrary: Allow failed thumbnails to be regenerated

parent 424f0b75
......@@ -495,6 +495,14 @@ class IMediaLibrary
*/
virtual void forceRescan() = 0;
/**
* @brief enableFailedThumbnailRegeneration Allow failed thumbnail attempt to be retried
*
* This will not attempt to regenerate the thumbnail immediatly, requestThumbnail
* still has to be called afterward.
*/
virtual void enableFailedThumbnailRegeneration() = 0;
/**
* \brief requestThumbnail Queues a thumbnail generation request for
* this media, to be run asynchronously.
......
......@@ -1496,6 +1496,11 @@ void MediaLibrary::forceRescan()
}
}
void MediaLibrary::enableFailedThumbnailRegeneration()
{
Thumbnail::deleteFailureRecords( this );
}
bool MediaLibrary::requestThumbnail( MediaPtr media )
{
if ( m_thumbnailer == nullptr )
......
......@@ -180,6 +180,8 @@ public:
virtual void forceRescan() override;
virtual void enableFailedThumbnailRegeneration() override;
virtual bool requestThumbnail( MediaPtr media ) override;
virtual void addParserService( std::shared_ptr<parser::IParserService> service ) override;
......
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