|
|
|
@ -264,6 +264,7 @@ Session::Session(QObject *parent)
@@ -264,6 +264,7 @@ Session::Session(QObject *parent)
|
|
|
|
|
, m_diskCacheTTL(BITTORRENT_SESSION_KEY("DiskCacheTTL"), 60) |
|
|
|
|
, m_useOSCache(BITTORRENT_SESSION_KEY("UseOSCache"), true) |
|
|
|
|
, m_guidedReadCacheEnabled(BITTORRENT_SESSION_KEY("GuidedReadCache"), true) |
|
|
|
|
, m_isSuggestMode(BITTORRENT_SESSION_KEY("SuggestMode"), false) |
|
|
|
|
, m_isAnonymousModeEnabled(BITTORRENT_SESSION_KEY("AnonymousModeEnabled"), false) |
|
|
|
|
, m_isQueueingEnabled(BITTORRENT_SESSION_KEY("QueueingSystemEnabled"), true) |
|
|
|
|
, m_maxActiveDownloads(BITTORRENT_SESSION_KEY("MaxActiveDownloads"), 3, lowerLimited(-1)) |
|
|
|
@ -1260,6 +1261,7 @@ void Session::configure(libtorrent::settings_pack &settingsPack)
@@ -1260,6 +1261,7 @@ void Session::configure(libtorrent::settings_pack &settingsPack)
|
|
|
|
|
settingsPack.set_int(libt::settings_pack::disk_io_read_mode, mode); |
|
|
|
|
settingsPack.set_int(libt::settings_pack::disk_io_write_mode, mode); |
|
|
|
|
settingsPack.set_bool(libt::settings_pack::guided_read_cache, isGuidedReadCacheEnabled()); |
|
|
|
|
settingsPack.set_bool(libt::settings_pack::suggest_mode, isSuggestModeEnabled()); |
|
|
|
|
|
|
|
|
|
settingsPack.set_bool(libt::settings_pack::anonymous_mode, isAnonymousModeEnabled()); |
|
|
|
|
|
|
|
|
@ -1496,6 +1498,7 @@ void Session::configure(libtorrent::session_settings &sessionSettings)
@@ -1496,6 +1498,7 @@ void Session::configure(libtorrent::session_settings &sessionSettings)
|
|
|
|
|
sessionSettings.disk_io_read_mode = mode; |
|
|
|
|
sessionSettings.disk_io_write_mode = mode; |
|
|
|
|
sessionSettings.guided_read_cache = isGuidedReadCacheEnabled(); |
|
|
|
|
sessionSettings.suggest_mode = isSuggestModeEnabled(); |
|
|
|
|
|
|
|
|
|
sessionSettings.anonymous_mode = isAnonymousModeEnabled(); |
|
|
|
|
|
|
|
|
@ -2926,6 +2929,19 @@ void Session::setGuidedReadCacheEnabled(bool enabled)
@@ -2926,6 +2929,19 @@ void Session::setGuidedReadCacheEnabled(bool enabled)
|
|
|
|
|
configureDeferred(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool Session::isSuggestModeEnabled() const |
|
|
|
|
{ |
|
|
|
|
return m_isSuggestMode; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Session::setSuggestMode(bool mode) |
|
|
|
|
{ |
|
|
|
|
if (mode == m_isSuggestMode) return; |
|
|
|
|
|
|
|
|
|
m_isSuggestMode = mode; |
|
|
|
|
configureDeferred(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool Session::isAnonymousModeEnabled() const |
|
|
|
|
{ |
|
|
|
|
return m_isAnonymousModeEnabled; |
|
|
|
|