Moving kilo to new api 1.1.0
Cette révision appartient à :
Parent
669c43fb4d
révision
b28fe5cf3c
2 fichiers modifiés avec 9 ajouts et 6 suppressions
|
@ -83,7 +83,8 @@ var Kilo = function (params) {
|
|||
|
||||
//Adding the torrent under and above the previewed one.
|
||||
if (this.listContext) {
|
||||
Query.Get('/api/search?limit=2', function (torrents) {
|
||||
Query.Get('/api/search?limit=2', function (data) {
|
||||
torrents = data.torrents
|
||||
var torrentHTML = []
|
||||
var l = torrents.length
|
||||
for (var i = 0; i < l; i++) {
|
||||
|
|
|
@ -18,18 +18,20 @@ var Torrents = {
|
|||
var searchArgs = (window.location.search != "") ? window.location.search.substr(1) : ""
|
||||
searchArgs = (Torrents.LastID > 0) ? "?fromID="+Torrents.LastID+"&"+searchArgs : "?"+searchArgs
|
||||
Query.Get(Torrents.SearchURL+searchArgs,
|
||||
Templates.ApplyItemListRenderer({
|
||||
templateName: "torrents.item", method: "prepend", element: document.getElementById("torrentListResults")
|
||||
}), function(torrents) {
|
||||
function(data) {
|
||||
var torrents = data.torrents
|
||||
Templates.ApplyItemListRenderer({
|
||||
templateName: "torrents.item", method: "prepend", element: document.getElementById("torrentListResults")
|
||||
})(torrents)
|
||||
for (var i =0; i < torrents.length; i++) { if (Torrents.LastID < torrents[i].id) Torrents.LastID = torrents[i].id; }
|
||||
parseAllDates();
|
||||
parseAllDates()
|
||||
Torrents.Refresh()
|
||||
});
|
||||
}, this.Seconds*1000);
|
||||
}
|
||||
},
|
||||
StartRefresh: function() {
|
||||
this.CanRefresh = true;
|
||||
this.CanRefresh = true
|
||||
this.Refresh()
|
||||
}
|
||||
}
|
||||
|
|
Référencer dans un nouveau ticket