summaryrefslogtreecommitdiff
path: root/src/requests.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2012-01-13 15:29:10 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2012-01-13 15:29:10 +0000
commit5d019aa0e7ee5178d697162403819b8cce2f91f8 (patch)
tree75b77d986c7ca280807f6b9649c390794f563875 /src/requests.c
parent7aef8c5669946d7a13ec56e1b3a3c72584ab3284 (diff)
a torrent priority right click menu. change the refresh on interactive action behavior to make sure priority/other changes are refreshed immediately.
Diffstat (limited to 'src/requests.c')
-rw-r--r--src/requests.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/requests.c b/src/requests.c
index a600396..38e3480 100644
--- a/src/requests.c
+++ b/src/requests.c
@@ -39,9 +39,11 @@ JsonNode *generic_request(gchar * method, JsonArray * ids)
{
JsonNode *root = base_request(method);
- if (ids)
- json_object_set_array_member(node_get_arguments(root),
- PARAM_IDS, ids);
+ if (ids) {
+ JsonObject *args = node_get_arguments(root);
+ json_object_set_array_member(args, PARAM_IDS, ids);
+ request_set_tag_from_ids(root, ids);
+ }
return root;
}
@@ -273,8 +275,7 @@ void request_set_tag(JsonNode * req, gint64 tag)
void request_set_tag_from_ids(JsonNode * req, JsonArray * ids)
{
gint64 id =
- json_array_get_length(ids) == 1 ? json_array_get_int_element(ids,
- 0) :
- -1;
+ json_array_get_length(ids) == 1 ?
+ json_array_get_int_element(ids, 0) : TORRENT_GET_TAG_MODE_FULL;
request_set_tag(req, id);
}