mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 07:05:57 -05:00
Improve reload perforamnce by skipping db lookups on forced reload
This commit is contained in:
parent
68e4731d18
commit
bccd2e473f
@ -1866,6 +1866,13 @@ MP3FILE *db_sql_fetch_path(char **pe, char *path, int index) {
|
||||
int err;
|
||||
char *query;
|
||||
|
||||
/* if we are doing a full reload, then it can't be in here.
|
||||
* besides, we don't have an index anyway, so we don't want to
|
||||
* do this fetch right now
|
||||
*/
|
||||
if((db_sql_in_scan) && (db_sql_reload))
|
||||
return NULL;
|
||||
|
||||
/* not very portable, but works for sqlite */
|
||||
if(conf_get_int("scanning","case_sensitive",0)) {
|
||||
query="select * from songs where path='%q' and idx=%d";
|
||||
|
Loading…
Reference in New Issue
Block a user