mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-25 20:16:14 -05:00
[jsonapi] add param to 'api/update?path=....' endpoint to allow client request for path specific scans
This commit is contained in:
@@ -1230,10 +1230,16 @@ static int
|
|||||||
jsonapi_reply_update(struct httpd_request *hreq)
|
jsonapi_reply_update(struct httpd_request *hreq)
|
||||||
{
|
{
|
||||||
const char *param;
|
const char *param;
|
||||||
|
const char *param_path;
|
||||||
|
|
||||||
param = httpd_query_value_find(hreq->query, "scan_kind");
|
param = httpd_query_value_find(hreq->query, "scan_kind");
|
||||||
|
param_path = httpd_query_value_find(hreq->query, "path");
|
||||||
|
|
||||||
|
if (param_path)
|
||||||
|
library_rescan_path(param_path);
|
||||||
|
else
|
||||||
library_rescan(db_scan_kind_enum(param));
|
library_rescan(db_scan_kind_enum(param));
|
||||||
|
|
||||||
return HTTP_NOCONTENT;
|
return HTTP_NOCONTENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user