diff --git a/src/module/module_repo.c b/src/module/module_repo.c index 1235aaa405b372e086b3b1ce8e9abcb823576543..0fe6f19d2f3a7c4341e13b59d9e3fb2e92b22d1f 100644 --- a/src/module/module_repo.c +++ b/src/module/module_repo.c @@ -1076,8 +1076,16 @@ mod_update(va_list *va) args->filter_uri = lkt_uri_copy(uri_ptr); /* `args` and `args->filter_uri` are moved, is owner is now - * `___worker_update`. That function will free those pointers. */ - if (worker_pool_push(&(*repo)->workers, ___worker_update, (void *)args)) { + * `___worker_update`. That function will free those pointers. We + * also select the update fonction version depending on the query, + * if the query is an id, we will use the *from_ids* version, + * enabling the user to queue the different kara to dl by their ID */ + + const worker_function update_version = (lkt_uri_get_type(args->filter_uri) == URI_ID) + ? ___worker_update_from_ids + : ___worker_update; + + if (worker_pool_push(&(*repo)->workers, update_version, (void *)args)) { LOG_ERROR("REPO", "Out of memory"); ret = 1; } else