mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-03-10 20:31:47 +00:00
Don't perform unnecessary actions with preloading magnets
This commit is contained in:
parent
c80238d66f
commit
da586828be
@ -3678,12 +3678,11 @@ void SessionImpl::setMaxConnectionsPerTorrent(int max)
|
|||||||
{
|
{
|
||||||
m_maxConnectionsPerTorrent = max;
|
m_maxConnectionsPerTorrent = max;
|
||||||
|
|
||||||
// Apply this to all session torrents
|
for (const TorrentImpl *torrent : asConst(m_torrents))
|
||||||
for (const lt::torrent_handle &handle : m_nativeSession->get_torrents())
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
handle.set_max_connections(max);
|
torrent->nativeHandle().set_max_connections(max);
|
||||||
}
|
}
|
||||||
catch (const std::exception &) {}
|
catch (const std::exception &) {}
|
||||||
}
|
}
|
||||||
@ -3702,12 +3701,11 @@ void SessionImpl::setMaxUploadsPerTorrent(int max)
|
|||||||
{
|
{
|
||||||
m_maxUploadsPerTorrent = max;
|
m_maxUploadsPerTorrent = max;
|
||||||
|
|
||||||
// Apply this to all session torrents
|
for (const TorrentImpl *torrent : asConst(m_torrents))
|
||||||
for (const lt::torrent_handle &handle : m_nativeSession->get_torrents())
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
handle.set_max_uploads(max);
|
torrent->nativeHandle().set_max_uploads(max);
|
||||||
}
|
}
|
||||||
catch (const std::exception &) {}
|
catch (const std::exception &) {}
|
||||||
}
|
}
|
||||||
@ -4318,8 +4316,14 @@ void SessionImpl::setReannounceWhenAddressChangedEnabled(const bool enabled)
|
|||||||
|
|
||||||
void SessionImpl::reannounceToAllTrackers() const
|
void SessionImpl::reannounceToAllTrackers() const
|
||||||
{
|
{
|
||||||
for (const lt::torrent_handle &torrent : m_nativeSession->get_torrents())
|
for (const TorrentImpl *torrent : asConst(m_torrents))
|
||||||
torrent.force_reannounce(0, -1, lt::torrent_handle::ignore_min_interval);
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
torrent->nativeHandle().force_reannounce(0, -1, lt::torrent_handle::ignore_min_interval);
|
||||||
|
}
|
||||||
|
catch (const std::exception &) {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int SessionImpl::stopTrackerTimeout() const
|
int SessionImpl::stopTrackerTimeout() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user