diff --git a/patches/webtorrent+0.116.0.patch b/patches/webtorrent+0.116.0.patch new file mode 100644 index 0000000..bcc1c67 --- /dev/null +++ b/patches/webtorrent+0.116.0.patch @@ -0,0 +1,26 @@ +diff --git a/node_modules/webtorrent/lib/file.js b/node_modules/webtorrent/lib/file.js +index caa395d..80234de 100644 +--- a/node_modules/webtorrent/lib/file.js ++++ b/node_modules/webtorrent/lib/file.js +@@ -21,6 +21,7 @@ class File extends EventEmitter { + this.length = file.length + this.offset = file.offset + ++ this.isSelected = true + this.done = false + + const start = file.offset +@@ -85,11 +86,13 @@ class File extends EventEmitter { + + select (priority) { + if (this.length === 0) return ++ this.isSelected = true + this._torrent.select(this._startPiece, this._endPiece, priority) + } + + deselect () { + if (this.length === 0) return ++ this.isSelected = false + this._torrent.deselect(this._startPiece, this._endPiece, false) + } +