Commit 0a27ad4b authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

unittests: MediaLibraryTester: Add a helper to force last played date

parent ba8a318f
......@@ -206,6 +206,13 @@ bool MediaLibraryTester::setMediaInsertionDate( int64_t mediaId, time_t t )
return sqlite::Tools::executeUpdate( getConn(), req, t, mediaId );
}
bool MediaLibraryTester::setMediaLastPlayedDate( int64_t mediaId, time_t lastPlayedDate )
{
std::string req = "UPDATE " + Media::Table::Name + " SET last_played_date = ? "
"WHERE id_media = ?";
return sqlite::Tools::executeUpdate( getConn(), req, lastPlayedDate, mediaId );
}
bool MediaLibraryTester::outdateAllExternalMedia()
{
std::string req = "UPDATE " + Media::Table::Name + " SET last_played_date = 1 "
......
......@@ -75,6 +75,7 @@ public:
void deleteMedia( int64_t mediaId );
bool outdateAllDevices();
bool setMediaInsertionDate( int64_t mediaId, time_t t );
bool setMediaLastPlayedDate( int64_t mediaId, time_t lastPlayedDate );
bool outdateAllExternalMedia();
bool setMediaType( int64_t mediaId, IMedia::Type type );
uint32_t countNbThumbnails();
......
Supports Markdown
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