-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtransmission.html
105 lines (95 loc) · 4.14 KB
/
transmission.html
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<script type="text/x-red" data-template-name="transmission-config">
<div class="form-row">
<label for="node-config-input-hostname"><i class="fa fa-bookmark"></i>Host Name</label>
<input class="input-append-left" type="text" id="node-config-input-hostname" style="width: 40%;" >
</div>
<div class="form-row">
<label for="node-config-input-portnum"><i class="fa fa-bookmark"></i>Port Num</label>
<input class="input-append-left" type="text" id="node-config-input-portnum" style="width: 40%;" >
</div>
<div class="form-row">
<label for="node-config-input-username"><i class="fa fa-bookmark"></i>User</label>
<input class="input-append-left" type="text" id="node-config-input-username" style="width: 40%;" >
</div>
<div class="form-row">
<label for="node-config-input-password"><i class="fa fa-bookmark"></i>Password</label>
<input class="input-append-left" type="text" id="node-config-input-password" style="width: 40%;" >
</div>
</script>
<script type="text/javascript">
(function() {
RED.nodes.registerType('transmission-config',{
category: 'config',
defaults: { },
credentials: {
hostname: {required:true},
portnum: {required:false},
username: {required:false},
password: {required:false}
},
label: function() {
return "Transmission API";
},
exportable: false,
});
})();
</script>
<script type="text/x-red" data-template-name="Transmission List Torrents">
<div class="form-row">
<label for="node-input-config"><i class="fa fa-user"></i> Transmission API</label>
<input type="text" id="node-input-config">
</div>
</script>
<script type="text/x-red" data-help-name="Transmission List Torrents">
<p>Gets the current torrent list JSON data from the Transmission Instance.</p>
<p>Returns an Array of the RPC JSON data in msg.payload with a msg.topic of '/transmission.v1/torrentData'</p>
<p>See the 3.3 Torrent Accessors section of the RPC-Spec <a href="https://trac.transmissionbt.com/browser/trunk/extras/rpc-spec.txt" target="_blank">https://trac.transmissionbt.com/browser/trunk/extras/rpc-spec.txt</a>
</script>
<script type="text/javascript">
RED.nodes.registerType('Transmission List Torrents',{
category: 'advanced',
color:"#C0DEED",
defaults: {
config: {type:"transmission-config",required:true},
name: {value:""}
},
inputs:1,
outputs:1,
icon: "transmission.png",
label: function() {
return this.name ? this.name : "Transmission";
}
});
</script>
<script type="text/x-red" data-template-name="Transmission Add Torrent">
<div class="form-row">
<label for="node-input-config"><i class="fa fa-user"></i> Transmission API</label>
<input type="text" id="node-input-config">
</div>
<div class="form-row node-input-url">
<label for="node-input-url"><i class="fa fa-tag"></i> Url</label>
<input type="text" id="node-input-url" placeholder="url">
</div>
</script>
<script type="text/x-red" data-help-name="Transmission Add Torrent">
<p>Adds a new torrent via the config panel URL or msg.url value of a .torrent file or a magnet reference.</p>
<p>Returns a single instance of the RPC JSON data in msg.payload with a msg.topic of '/transmission.v1/torrentAdd'</p>
<p>See the 3.3 Torrent Accessors section of the RPC-Spec <a href="https://trac.transmissionbt.com/browser/trunk/extras/rpc-spec.txt" target="_blank">https://trac.transmissionbt.com/browser/trunk/extras/rpc-spec.txt</a>
</script>
<script type="text/javascript">
RED.nodes.registerType('Transmission Add Torrent',{
category: 'advanced',
color:"#C0DEED",
defaults: {
config: {type:"transmission-config",required:true},
url: {value: "",required:true},
name: {value:""}
},
inputs:1,
outputs:1,
icon: "transmission.png",
label: function() {
return this.name ? this.name : "TransmissonTorrentAdd";
}
});
</script>