1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-02-02 18:04:32 +00:00

Disable "Upload mode" when start preloaded torrent

This commit is contained in:
Vladimir Golovnev (Glassez) 2019-06-04 07:14:21 +03:00
parent 4ae4ae3cfc
commit b644d6685f
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7

View File

@ -1862,10 +1862,13 @@ bool Session::addTorrent_impl(CreateTorrentParams params, const MagnetUri &magne
--m_extraLimit;
try {
// Preloaded torrent is in "Upload mode" so we need to disable it
// otherwise the torrent never be downloaded (until application restart)
#if (LIBTORRENT_VERSION_NUM < 10200)
handle.auto_managed(false);
handle.set_upload_mode(false);
#else
handle.unset_flags(lt::torrent_flags::auto_managed);
handle.unset_flags(lt::torrent_flags::auto_managed | lt::torrent_flags::upload_mode);
#endif
handle.pause();
}