Skip to content

Commit 0ef850c

Browse files
author
whatdoineed2do/Ray
committed
[jsonapi] add param to 'api/update?path=....' endpoint to allow client request for path specific scans
1 parent ae110d9 commit 0ef850c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/httpd_jsonapi.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,14 @@ jsonapi_reply_library(struct httpd_request *hreq)
11721172
static int
11731173
jsonapi_reply_update(struct httpd_request *hreq)
11741174
{
1175-
library_rescan();
1175+
char *param;
1176+
1177+
param = evhttp_find_header(hreq->query, "path");
1178+
if (param)
1179+
library_rescan_path(param);
1180+
else
1181+
library_rescan();
1182+
11761183
return HTTP_NOCONTENT;
11771184
}
11781185

0 commit comments

Comments
 (0)