Do not inhibit system sleep/auto shutdown for torrents stuck at downloading metadata

PR #17481.
This commit is contained in:
summer 2022-08-04 05:10:58 +00:00 committed by GitHub
parent fa3d98aa37
commit 54b50c3a8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2134,7 +2134,7 @@ bool Session::hasUnfinishedTorrents() const
{
return std::any_of(m_torrents.begin(), m_torrents.end(), [](const TorrentImpl *torrent)
{
return (!torrent->isSeed() && !torrent->isPaused() && !torrent->isErrored());
return (!torrent->isSeed() && !torrent->isPaused() && !torrent->isErrored() && torrent->hasMetadata());
});
}