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

Thumbnail: Allow failure records to be deleted

parent 6d7885a5
......@@ -155,5 +155,12 @@ std::shared_ptr<Thumbnail> Thumbnail::createForFailure( MediaLibraryPtr ml )
return self;
}
bool Thumbnail::deleteFailureRecords(MediaLibraryPtr ml)
{
static const std::string req = "DELETE FROM " + Table::Name +
" WHERE mrl IS NULL";
return sqlite::Tools::executeDelete( ml->getConn(), req );
}
}
......@@ -91,6 +91,13 @@ public:
*/
static std::shared_ptr<Thumbnail> createForFailure( MediaLibraryPtr ml );
/**
* @brief deleteFailureRecords Allow the thumbnail to retry any previously failed attempt
*
* This will delete all failure records
*/
static bool deleteFailureRecords( MediaLibraryPtr ml );
static const std::string EmptyMrl;
private:
......
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