1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/social/kickass/99-kickass.html
Antoine Aflalo ce7b5db629 Creation of a Kickass Torrent Node
That will query the kickass torrent database and return the torrent with the wanted criterias. Depends on: node-kickass
2014-04-20 20:47:06 +03:00

92 lines
3.4 KiB
HTML

<!--
Copyright 2013 IBM Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-template-name="kickass">
<div class="form-row">
<label for="node-input-title"><i class="icon-tag"></i> Title</label>
<input type="text" id="node-input-title" placeholder="Distribution Search">
</div>
<div class="form-row">
<label for="node-input-sort"><i class="icon-align-center"></i> Sort</label>
<select id="node-input-sort">
<option value="time_add">Age</option>
<option value="files_count">Files</option>
<option value="size">Size</option>
<option value="seeders">Seed</option>
<option value="leechers">Leech</option>
</select>
</div>
<div class="form-row">
<label for="node-input-order"><i class="icon-circle-arrow-up"></i> Order</label>
<select id="node-input-order">
<option value="desc">Descending</option>
<option value="asc">Ascending</option>
</select>
</div>
</script>
<script type="text/x-red" data-help-name="kickass">
<p>This node will query the database of <a target="_blank" href="https://kickass.to">Kickass Torrent</a> and return a list of torrent corresponding to the search.</p>
<p>Use the <code>msg.topic</code> as search criteria for KickAss Torrents. If no <code>msg.topic</code> is given, it will use the <code>title</code> of node.</p>
<p>The resulting torrents are put into <code>msg.payload</code> as a list of Object.</p>
<p>A torrent object will contain these information :
<pre>
{
"title":"Ubuntu 14.04 LTS Trusty Tahr desktop 32bit ISO",
"description":"Ubuntu 14.04",
"date":"2014-04-17T18:22:07.000Z",
"link":"http://kickass.to/ubuntu-14-04-lts-trusty-tahr-desktop-32bit-iso-t9007070.html",
"categories":[
"Applications - UNIX"
],
"torrentFileInfo":{
"url":"http://torcache.net/torrent/7A1073BC39E6B0B01E3730227B8FFEA6AEAC5D59.torrent?title=[kickass.to]ubuntu.14.04.lts.trusty.tahr.desktop.32bit.iso",
"type":"application/x-bittorrent",
"length":"1017118720"
},
"torrentMagnet":"magnet:?xt=urn:btih:7A1073BC39E6B0B01E3730227B8FFEA6AEAC5D59&dn=ubuntu+14+04+lts+trusty+tahr+desktop+32bit+iso&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce"
}
</pre></p>
</script>
<script type="text/javascript">
RED.nodes.registerType('kickass', {
category: 'social-input',
defaults: {
title: {value: ""},
sort: {value: "", required: true},
order: {value: "", required: true}
},
color: "#F7B457",
inputs: 1,
outputs: 1,
icon: "logo.png",
align: "right",
label: function () {
return this.title || "kickass";
},
labelStyle: function () {
return this.title ? "node_label_italic" : "";
}
});
</script>