|
|
@ -1862,10 +1862,13 @@ bool Session::addTorrent_impl(CreateTorrentParams params, const MagnetUri &magne |
|
|
|
--m_extraLimit; |
|
|
|
--m_extraLimit; |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
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) |
|
|
|
#if (LIBTORRENT_VERSION_NUM < 10200) |
|
|
|
handle.auto_managed(false); |
|
|
|
handle.auto_managed(false); |
|
|
|
|
|
|
|
handle.set_upload_mode(false); |
|
|
|
#else |
|
|
|
#else |
|
|
|
handle.unset_flags(lt::torrent_flags::auto_managed); |
|
|
|
handle.unset_flags(lt::torrent_flags::auto_managed | lt::torrent_flags::upload_mode); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
handle.pause(); |
|
|
|
handle.pause(); |
|
|
|
} |
|
|
|
} |
|
|
|