blob: 91e53b6fd294a8148d22721ec88ed473198b3b82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include "btcli.h"
void
usage_del(void)
{
printf(
"Remove torrents from btpd.\n"
"\n"
"Usage: del torrent ...\n"
"\n"
"Arguments:\n"
"file ...\n"
"\tThe torrents to remove.\n"
"\n");
exit(1);
}
void
cmd_del(int argc, char **argv)
{
struct ipc_torrent t;
if (argc < 2)
usage_del();
btpd_connect();
for (int i = 1; i < argc; i++)
if (torrent_spec(argv[i], &t))
handle_ipc_res(btpd_del(ipc, &t), "del", argv[i]);
}
|