From 0608a58c3bd1dbd8bd16c67cb6e5b2e516c24652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Stein?= Date: Tue, 25 Aug 2015 04:48:28 +0000 Subject: Add torrent.path --- lib/torrent.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/torrent.js b/lib/torrent.js index c3a9cf4..c7c7521 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -99,6 +99,11 @@ Object.defineProperty(Torrent.prototype, 'timeRemaining', { } }) +// Torrent Path +Object.defineProperty(Torrent.prototype, 'path', { + get: function () { return this._path; } +}) + // Bytes completed (excluding invalid data) Object.defineProperty(Torrent.prototype, 'downloaded', { get: function () { -- cgit v1.2.3 From bd69e4b9247bd935ac19f9fd47bff99c3fe81adf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Stein?= Date: Tue, 25 Aug 2015 04:49:58 +0000 Subject: Add torrent.path to README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 10053f5..48bdf3b 100644 --- a/README.md +++ b/README.md @@ -333,6 +333,10 @@ the file has. The attached [bittorrent-swarm](https://github.com/feross/bittorrent-swarm) instance. +#### `torrent.path` + +GEt the torrent download location + #### `torrent.destroy()` Alias for `client.remove(torrent)`. -- cgit v1.2.3 From 97172234633cd7d53b119cb1a37335f21a6ec962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Stein?= Date: Tue, 25 Aug 2015 04:52:12 +0000 Subject: Add torrent.downloaded and torrent.received to README --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 48bdf3b..8df1429 100644 --- a/README.md +++ b/README.md @@ -333,9 +333,17 @@ the file has. The attached [bittorrent-swarm](https://github.com/feross/bittorrent-swarm) instance. +#### `torrent.received` + +Get total bytes received from peers (including invalid data) + +#### `torrent.downloaded` + +Get total bytes received from peers (excluding invalid data) + #### `torrent.path` -GEt the torrent download location +Get the torrent download location #### `torrent.destroy()` -- cgit v1.2.3