mirror of
https://github.com/zoriya/flood.git
synced 2026-05-31 18:25:25 +00:00
Add ability to retrieve individual torrent
This commit is contained in:
@@ -18,6 +18,10 @@ class TorrentCollection {
|
||||
this.trackerCount = {all: 0};
|
||||
}
|
||||
|
||||
getTorrent(hash) {
|
||||
return this.torrents[hash].data;
|
||||
}
|
||||
|
||||
getTorrents() {
|
||||
let currentTorrents = {};
|
||||
|
||||
|
||||
@@ -156,6 +156,10 @@ var client = {
|
||||
request.send();
|
||||
},
|
||||
|
||||
getTorrent: (options, callback) => {
|
||||
callback(torrentCollection.getTorrent(options.hash));
|
||||
},
|
||||
|
||||
getTorrentStatusCount: (callback) => {
|
||||
callback(statusCount);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user