Skip to content

Commit

Permalink
[jsonapi] add param to 'api/update?path=....' endpoint to allow clien…
Browse files Browse the repository at this point in the history
…t request for path specific scans
  • Loading branch information
whatdoineed2do/Ray committed Jan 23, 2021
1 parent 123bc04 commit af2374a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/httpd_jsonapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,14 @@ jsonapi_reply_library(struct httpd_request *hreq)
static int
jsonapi_reply_update(struct httpd_request *hreq)
{
library_rescan();
char *param;

param = evhttp_find_header(hreq->query, "path");
if (param)
library_rescan_path(param);
else
library_rescan();

return HTTP_NOCONTENT;
}

Expand Down

0 comments on commit af2374a

Please sign in to comment.