Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDiego Rodríguez Baquero <DiegoRBaquero@users.noreply.github.com>2016-01-03 22:42:14 +0300
committerDiego Rodríguez Baquero <DiegoRBaquero@users.noreply.github.com>2016-01-03 22:42:14 +0300
commit87b8cc8231db0a570fb0cf4de5aeaa4c70541459 (patch)
tree31c55b91e4a4424090b657f558a1620b4bd6580b /lib
parent9b98c47d26d840cd51cb772de85f796230cde957 (diff)
Select priority
Allows selecting with a set priority, if not passed as argument, it will default to false/0
Diffstat (limited to 'lib')
-rw-r--r--lib/file.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/file.js b/lib/file.js
index 0c2b43c..1ba159f 100644
--- a/lib/file.js
+++ b/lib/file.js
@@ -44,9 +44,9 @@ function File (torrent, file) {
* Selects the file to be downloaded, but at a lower priority than files with streams.
* Useful if you know you need the file at a later stage.
*/
-File.prototype.select = function () {
+File.prototype.select = function (priority) {
if (this.length === 0) return
- this._torrent.select(this._startPiece, this._endPiece, false)
+ this._torrent.select(this._startPiece, this._endPiece, priority)
}
/**