[addon] fixes party downloaded rd torrents selection

This commit is contained in:
TheBeastLT
2020-07-14 18:55:26 +02:00
parent 76da5c9a19
commit 8a88a9a71c

View File

@@ -140,7 +140,7 @@ async function _unrestrictLink(RD, torrent, fileIndex) {
const targetFile = torrent.files.find(file => file.id === fileIndex + 1)
|| torrent.files.filter(file => file.selected).sort((a, b) => b.bytes - a.bytes)[0];
if (!targetFile.selected) {
await _selectTorrentFiles(RD, torrent, `${fileIndex + 1}`);
await _retryCreateTorrent(RD, torrent.hash.toLowerCase(), undefined, fileIndex);
return StaticResponse.DOWNLOADING;
}