mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-27 06:33:21 -05:00
Merge pull request #323 from chme/db
Remove unnecessary query in filescanner_process_media
This commit is contained in:
commit
70f3465dfe
1
src/db.c
1
src/db.c
@ -2312,6 +2312,7 @@ db_file_stamp_bypath(char *path, time_t *stamp, int *id)
|
|||||||
sqlite3_stmt *stmt;
|
sqlite3_stmt *stmt;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
*id = 0;
|
||||||
*stamp = 0;
|
*stamp = 0;
|
||||||
|
|
||||||
query = sqlite3_mprintf(Q_TMPL, path);
|
query = sqlite3_mprintf(Q_TMPL, path);
|
||||||
|
@ -626,7 +626,7 @@ filescanner_process_media(char *path, time_t mtime, off_t size, int type, struct
|
|||||||
mfi = external_mfi;
|
mfi = external_mfi;
|
||||||
|
|
||||||
if (stamp)
|
if (stamp)
|
||||||
mfi->id = db_file_id_bypath(path);
|
mfi->id = id;
|
||||||
|
|
||||||
mfi->fname = strdup(filename);
|
mfi->fname = strdup(filename);
|
||||||
if (!mfi->fname)
|
if (!mfi->fname)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user