node-red-nodes/social/kickass/99-kickass.html
Antoine Aflalo edf1323e85 Using node-kickass-json instead of node-kickass
The major difference is the use of the JSON API of Kickass instead of parsing the XML file of the search.
2014-04-21 12:13:41 +03:00

94 lines
3.3 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",
"category":"Applications",
"link":"http://kickass.to/ubuntu-14-04-lts-trusty-tahr-desktop-32bit-iso-t9007070.html",
"guid":"http://kickass.to/ubuntu-14-04-lts-trusty-tahr-desktop-32bit-iso-t9007070.html",
"pubDate":"Thursday 17 Apr 2014 18:22:07 +0000",
"torrentLink":"http://torcache.net/torrent/7A1073BC39E6B0B01E3730227B8FFEA6AEAC5D59.torrent?title=[kickass.to]ubuntu.14.04.lts.trusty.tahr.desktop.32bit.iso",
"files":1,
"comments":0,
"hash":"7A1073BC39E6B0B01E3730227B8FFEA6AEAC5D59",
"peers":2394,
"seeds":2092,
"leechs":302,
"size":1017118720,
"votes":2,
"verified":0
}
</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>