Merge pull request #11521 from Chocobo1/errorStatus

Fix stuck in wrong torrent state
This commit is contained in:
Mike Tzou 2019-12-03 19:22:39 +08:00 committed by GitHub
commit 2e8b17e498
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 10 deletions

View file

@ -4179,6 +4179,10 @@ void Session::createTorrentHandle(const lt::torrent_handle &nativeHandle)
// Send new torrent signal
if (!params.restored)
emit torrentNew(torrent);
// Torrent could have error just after adding to libtorrent
if (torrent->hasError())
LogMsg(tr("Torrent errored. Torrent: \"%1\". Error: %2.").arg(torrent->name(), torrent->error()), Log::WARNING);
}
void Session::handleAddTorrentAlert(const lt::add_torrent_alert *p)