{"action":"created","issue":{"url":"https://api.github.com/repos/tatsuhiro-t/aria2/issues/609","repository_url":"https://api.github.com/repos/tatsuhiro-t/aria2","labels_url":"https://api.github.com/repos/tatsuhiro-t/aria2/issues/609/labels{/name}","comments_url":"https://api.github.com/repos/tatsuhiro-t/aria2/issues/609/comments","events_url":"https://api.github.com/repos/tatsuhiro-t/aria2/issues/609/events","html_url":"https://github.com/tatsuhiro-t/aria2/issues/609","id":144204224,"number":609,"title":"Can not add options in aria2 using Python xmlrpc?","user":{"login":"xros","id":2342412,"avatar_url":"https://avatars.githubusercontent.com/u/2342412?v=3","gravatar_id":"","url":"https://api.github.com/users/xros","html_url":"https://github.com/xros","followers_url":"https://api.github.com/users/xros/followers","following_url":"https://api.github.com/users/xros/following{/other_user}","gists_url":"https://api.github.com/users/xros/gists{/gist_id}","starred_url":"https://api.github.com/users/xros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xros/subscriptions","organizations_url":"https://api.github.com/users/xros/orgs","repos_url":"https://api.github.com/users/xros/repos","events_url":"https://api.github.com/users/xros/events{/privacy}","received_events_url":"https://api.github.com/users/xros/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-29T09:15:41Z","updated_at":"2016-03-29T12:19:56Z","closed_at":null,"body":"I am using aria2 as a download client for remote control.\r\n\r\nAs what aria2 shows, it supports ```--on-download-complete```, it can pass 3 parameters to the executed script. Here's is the reference: https://aria2.github.io/manual/en/html/aria2c.html?highlight=on-download#event-hook\r\n\r\nBut now I am using a Python xmlrpc wrapper to talk to Aria2. this is the wrapper i am using: https://github.com/alfateam123/pyaria2\r\n\r\n```\r\nserver = PyAria2(\r\n    'localhost',\r\n    6800,\r\n    rpcSecret={\"useSecret\": False, \"secret\": None}\r\n)\r\nunique_id_accepted = server.addUri([http://somewhere.com/somefile.iso],\r\n                                  options={\r\n                                      \"dir\": \"/srv/\",\r\n                                      \"gid\": \"abcdef1234567890\",\r\n                                      \"max-connection per-server\": 5,\r\n                                      \"on-download-complete\": \"touch /tmp/done\"\r\n                                  }\r\n                                  )\r\n```\r\n\r\nif Aria2 starts to download from the URI, the ```unique_id_accepted``` is the same as ```gid``` in this scenario. Actually aria2 works. When I see the downloading jobs in Aria2, the `gid` is accepted. But after it completes, it does not execute the command ```touch /tmp/done``` \r\n\r\nIs there something wrong with the options?\r\n\r\nHow could you talk to aria2 to execute commands after it completes?\r\n\r\nSo many thanks!\r\n"},"comment":{"url":"https://api.github.com/repos/tatsuhiro-t/aria2/issues/comments/202864604","html_url":"https://github.com/tatsuhiro-t/aria2/issues/609#issuecomment-202864604","issue_url":"https://api.github.com/repos/tatsuhiro-t/aria2/issues/609","id":202864604,"user":{"login":"tatsuhiro-t","id":404610,"avatar_url":"https://avatars.githubusercontent.com/u/404610?v=3","gravatar_id":"","url":"https://api.github.com/users/tatsuhiro-t","html_url":"https://github.com/tatsuhiro-t","followers_url":"https://api.github.com/users/tatsuhiro-t/followers","following_url":"https://api.github.com/users/tatsuhiro-t/following{/other_user}","gists_url":"https://api.github.com/users/tatsuhiro-t/gists{/gist_id}","starred_url":"https://api.github.com/users/tatsuhiro-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatsuhiro-t/subscriptions","organizations_url":"https://api.github.com/users/tatsuhiro-t/orgs","repos_url":"https://api.github.com/users/tatsuhiro-t/repos","events_url":"https://api.github.com/users/tatsuhiro-t/events{/privacy}","received_events_url":"https://api.github.com/users/tatsuhiro-t/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T12:19:56Z","updated_at":"2016-03-29T12:19:56Z","body":"on-download-complete cannot be specified per download.  See https://aria2.github.io/manual/en/html/aria2c.html#id3"}}