mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 07:46:17 -07:00
parent
9d6d3a30eb
commit
2a20764d39
9 changed files with 58 additions and 2 deletions
|
@ -455,6 +455,7 @@ SessionImpl::SessionImpl(QObject *parent)
|
|||
, m_torrentStopCondition(BITTORRENT_SESSION_KEY(u"TorrentStopCondition"_s), Torrent::StopCondition::None)
|
||||
, m_torrentContentLayout(BITTORRENT_SESSION_KEY(u"TorrentContentLayout"_s), TorrentContentLayout::Original)
|
||||
, m_isAppendExtensionEnabled(BITTORRENT_SESSION_KEY(u"AddExtensionToIncompleteFiles"_s), false)
|
||||
, m_isUnwantedFolderEnabled(BITTORRENT_SESSION_KEY(u"UseUnwantedFolder"_s), false)
|
||||
, m_refreshInterval(BITTORRENT_SESSION_KEY(u"RefreshInterval"_s), 1500)
|
||||
, m_isPreallocationEnabled(BITTORRENT_SESSION_KEY(u"Preallocation"_s), false)
|
||||
, m_torrentExportDirectory(BITTORRENT_SESSION_KEY(u"TorrentExportDirectory"_s))
|
||||
|
@ -695,6 +696,23 @@ void SessionImpl::setAppendExtensionEnabled(const bool enabled)
|
|||
}
|
||||
}
|
||||
|
||||
bool SessionImpl::isUnwantedFolderEnabled() const
|
||||
{
|
||||
return m_isUnwantedFolderEnabled;
|
||||
}
|
||||
|
||||
void SessionImpl::setUnwantedFolderEnabled(const bool enabled)
|
||||
{
|
||||
if (isUnwantedFolderEnabled() != enabled)
|
||||
{
|
||||
m_isUnwantedFolderEnabled = enabled;
|
||||
|
||||
// append or remove .!qB extension for incomplete files
|
||||
for (TorrentImpl *const torrent : asConst(m_torrents))
|
||||
torrent->handleUnwantedFolderToggled();
|
||||
}
|
||||
}
|
||||
|
||||
int SessionImpl::refreshInterval() const
|
||||
{
|
||||
return m_refreshInterval;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue