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

Media: Don't include non-present media in search results

parent 20a96d77
......@@ -434,6 +434,7 @@ std::vector<MediaPtr> Media::search( DBConnection dbConn, const std::string& tit
{
static const std::string req = "SELECT * FROM " + policy::MediaTable::Name + " WHERE"
" id_media IN (SELECT rowid FROM " + policy::MediaTable::Name + "Fts"
" WHERE " + policy::MediaTable::Name + "Fts MATCH ?)";
" WHERE " + policy::MediaTable::Name + "Fts MATCH ?)"
"AND is_present = 1";
return Media::fetchAll<IMedia>( dbConn, req, title + "*" );
}
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