From 04f3f9d29da8f5490e936ab361467ceccc064c87 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Thu, 18 Jun 2015 16:28:52 +0300 Subject: [PATCH] Fix ratio limit for new torrents. --- src/core/bittorrent/torrenthandle.cpp | 4 ++-- src/core/bittorrent/torrenthandle.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/bittorrent/torrenthandle.cpp b/src/core/bittorrent/torrenthandle.cpp index e446f2af8..14c8e6ccb 100644 --- a/src/core/bittorrent/torrenthandle.cpp +++ b/src/core/bittorrent/torrenthandle.cpp @@ -134,7 +134,7 @@ AddTorrentData::AddTorrentData(const AddTorrentParams &in) , addForced(in.addForced) , addPaused(in.addPaused) , filePriorities(in.filePriorities) - , ratioLimit(TorrentHandle::USE_GLOBAL_RATIO) + , ratioLimit(in.ignoreShareRatio ? TorrentHandle::NO_RATIO_LIMIT : TorrentHandle::USE_GLOBAL_RATIO) { } @@ -192,7 +192,7 @@ TorrentHandle::TorrentHandle(Session *session, const libtorrent::torrent_handle , m_savePath(Utils::Fs::toNativePath(data.savePath)) , m_label(data.label) , m_hasSeedStatus(data.resumed ? data.hasSeedStatus : false) - , m_ratioLimit(data.resumed ? data.ratioLimit : (data.ignoreShareRatio ? NO_RATIO_LIMIT : USE_GLOBAL_RATIO)) + , m_ratioLimit(data.ratioLimit) , m_tempPathDisabled(data.disableTempPath) , m_hasMissingFiles(false) , m_useDefaultSavePath(false) diff --git a/src/core/bittorrent/torrenthandle.h b/src/core/bittorrent/torrenthandle.h index 1b0401420..deeab3ffd 100644 --- a/src/core/bittorrent/torrenthandle.h +++ b/src/core/bittorrent/torrenthandle.h @@ -95,7 +95,6 @@ namespace BitTorrent TriStateBool addPaused; // for new torrents QVector filePriorities; - bool ignoreShareRatio; // for resumed torrents QDateTime addedTime; qreal ratioLimit;