From 87b8cc8231db0a570fb0cf4de5aeaa4c70541459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez=20Baquero?= Date: Sun, 3 Jan 2016 14:42:14 -0500 Subject: [PATCH] Select priority Allows selecting with a set priority, if not passed as argument, it will default to false/0 --- lib/file.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/file.js b/lib/file.js index 0c2b43c8..1ba159f8 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) } /**