Add ability to retrieve individual torrent

This commit is contained in:
John Furrow
2016-11-05 13:08:46 -07:00
parent 199f731de0
commit 9da59fe583
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -18,6 +18,10 @@ class TorrentCollection {
this.trackerCount = {all: 0};
}
getTorrent(hash) {
return this.torrents[hash].data;
}
getTorrents() {
let currentTorrents = {};
+4
View File
@@ -156,6 +156,10 @@ var client = {
request.send();
},
getTorrent: (options, callback) => {
callback(torrentCollection.getTorrent(options.hash));
},
getTorrentStatusCount: (callback) => {
callback(statusCount);
},