mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 22:10:15 -05:00
[db] Refactor db_query_fetch_* functions to take the output parameter
first and the input parameter as last parameter
This commit is contained in:
@@ -1909,7 +1909,7 @@ playlist_add_files(FILE *fp, int pl_id, const char *virtual_path)
|
||||
|
||||
if (qp.results > 0)
|
||||
{
|
||||
while ((ret = db_query_fetch_file(&qp, &dbmfi)) == 0)
|
||||
while ((ret = db_query_fetch_file(&dbmfi, &qp)) == 0)
|
||||
{
|
||||
if ((safe_atou32(dbmfi.data_kind, &data_kind) < 0)
|
||||
|| (data_kind == DATA_KIND_PIPE))
|
||||
|
||||
@@ -390,7 +390,7 @@ mfi_id_find(const char *path)
|
||||
|
||||
winner = NULL;
|
||||
score = 0;
|
||||
while ((db_query_fetch_string(&qp, &dbpath) == 0) && dbpath)
|
||||
while ((db_query_fetch_string(&dbpath, &qp) == 0) && dbpath)
|
||||
{
|
||||
if (qp.results == 1)
|
||||
{
|
||||
|
||||
@@ -317,7 +317,7 @@ process_regular_file(int pl_id, char *path)
|
||||
|
||||
winner = NULL;
|
||||
score = 0;
|
||||
while ((db_query_fetch_string(&qp, &dbpath) == 0) && dbpath)
|
||||
while ((db_query_fetch_string(&dbpath, &qp) == 0) && dbpath)
|
||||
{
|
||||
if (qp.results == 1)
|
||||
{
|
||||
|
||||
@@ -568,7 +568,7 @@ rss_scan_all(enum rss_scan_type scan_type)
|
||||
}
|
||||
|
||||
count = 0;
|
||||
while (((ret = db_query_fetch_pl(&qp, &dbpli)) == 0) && (dbpli.path))
|
||||
while (((ret = db_query_fetch_pl(&dbpli, &qp)) == 0) && (dbpli.path))
|
||||
{
|
||||
ret = rss_scan(dbpli.path, scan_type);
|
||||
if (ret == 0)
|
||||
|
||||
@@ -1508,7 +1508,7 @@ cleanup_spotify_files(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (((ret = db_query_fetch_string(&qp, &path)) == 0) && (path))
|
||||
while (((ret = db_query_fetch_string(&path, &qp)) == 0) && (path))
|
||||
{
|
||||
cache_artwork_delete_by_path(path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user