mirror of
https://github.com/zoriya/flood.git
synced 2026-06-01 10:35:59 +00:00
Fix bug in multi-file downloads
This commit is contained in:
@@ -79,11 +79,7 @@ var client = {
|
||||
|
||||
downloadFiles(hash, files, res) {
|
||||
try {
|
||||
let selectedTorrent = null;
|
||||
|
||||
this.getTorrent({hash}, (torrent) => {
|
||||
selectedTorrent = torrent;
|
||||
});
|
||||
const selectedTorrent = torrentService.getTorrent(hash);
|
||||
|
||||
this.getTorrentDetails(hash, (torrentDetails) => {
|
||||
const filePathsToDownload = this.findFilesByIndicies(
|
||||
|
||||
@@ -189,6 +189,10 @@ class TorrentService extends EventEmitter {
|
||||
return torrentStatus;
|
||||
}
|
||||
|
||||
getTorrent(hash) {
|
||||
return this.torrentListSummary.torrents[hash];
|
||||
}
|
||||
|
||||
getTorrentList() {
|
||||
return this.torrentListSummary;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user