[mpd] optimize query selecting files for virtual_path to use the index
This commit is contained in:
parent
5f2fe87351
commit
9a1c8409cf
|
@ -1557,13 +1557,13 @@ mpd_queueitem_make(char *path, int recursive)
|
|||
|
||||
if (recursive)
|
||||
{
|
||||
qp.filter = sqlite3_mprintf("f.virtual_path LIKE '/%q%%'", path);
|
||||
qp.filter = sqlite3_mprintf("disabled = 0 AND f.virtual_path LIKE '/%q%%'", path);
|
||||
if (!qp.filter)
|
||||
DPRINTF(E_DBG, L_PLAYER, "Out of memory\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
qp.filter = sqlite3_mprintf("f.virtual_path LIKE '/%q'", path);
|
||||
qp.filter = sqlite3_mprintf("disabled = 0 AND f.virtual_path LIKE '/%q'", path);
|
||||
if (!qp.filter)
|
||||
DPRINTF(E_DBG, L_PLAYER, "Out of memory\n");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue