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

Media: Add missing sqlite lock

parent de812db1
......@@ -280,7 +280,9 @@ const IMediaMetadata& Media::metadata( IMedia::MetadataType type ) const
std::vector<MediaMetadata> res;
static const std::string req = "SELECT * FROM " + policy::MediaMetadataTable::Name +
" WHERE id_media = ?";
sqlite::Statement stmt( m_ml->getConn()->getConn(), req );
auto conn = m_ml->getConn();
auto ctx = conn->acquireReadContext();
sqlite::Statement stmt( conn->getConn(), req );
stmt.execute( m_id );
for ( sqlite::Row row = stmt.row(); row != nullptr; row = stmt.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