diff --git a/README.md b/README.md index 10053f5a..8df1429c 100644 --- a/README.md +++ b/README.md @@ -333,6 +333,18 @@ 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 + #### `torrent.destroy()` Alias for `client.remove(torrent)`. diff --git a/lib/torrent.js b/lib/torrent.js index c3a9cf42..c7c75211 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 () {