mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-03 14:12:30 -06:00
Don't resume "paused" torrents when checking by libtorrent
This commit is contained in:
@@ -49,17 +49,6 @@ NativeTorrentExtension::NativeTorrentExtension(const lt::torrent_handle &torrent
|
||||
{
|
||||
}
|
||||
|
||||
// This method is called when state of torrent is changed
|
||||
void NativeTorrentExtension::on_state(const lt::torrent_status::state_t state)
|
||||
{
|
||||
// When a torrent enters "checking files" state while paused, we temporarily resume it
|
||||
// (really we just allow libtorrent to resume it by enabling auto management for it).
|
||||
if (state == lt::torrent_status::checking_files) {
|
||||
if (isPaused(m_torrentHandle.status({})))
|
||||
m_torrentHandle.set_flags(lt::torrent_flags::stop_when_ready | lt::torrent_flags::auto_managed);
|
||||
}
|
||||
}
|
||||
|
||||
bool NativeTorrentExtension::on_pause()
|
||||
{
|
||||
if (!isAutoManaged(m_torrentHandle.status({})))
|
||||
|
||||
Reference in New Issue
Block a user