Browse Source

Merge pull request #3247 from glassez/ratio

Fix ratio limit for new torrents. Closes #3210.
adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
fd6fcffa67
  1. 4
      src/core/bittorrent/torrenthandle.cpp
  2. 1
      src/core/bittorrent/torrenthandle.h

4
src/core/bittorrent/torrenthandle.cpp

@ -134,7 +134,7 @@ AddTorrentData::AddTorrentData(const AddTorrentParams &in)
, addForced(in.addForced) , addForced(in.addForced)
, addPaused(in.addPaused) , addPaused(in.addPaused)
, filePriorities(in.filePriorities) , 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_savePath(Utils::Fs::toNativePath(data.savePath))
, m_label(data.label) , m_label(data.label)
, m_hasSeedStatus(data.resumed ? data.hasSeedStatus : false) , 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_tempPathDisabled(data.disableTempPath)
, m_hasMissingFiles(false) , m_hasMissingFiles(false)
, m_useDefaultSavePath(false) , m_useDefaultSavePath(false)

1
src/core/bittorrent/torrenthandle.h

@ -95,7 +95,6 @@ namespace BitTorrent
TriStateBool addPaused; TriStateBool addPaused;
// for new torrents // for new torrents
QVector<int> filePriorities; QVector<int> filePriorities;
bool ignoreShareRatio;
// for resumed torrents // for resumed torrents
QDateTime addedTime; QDateTime addedTime;
qreal ratioLimit; qreal ratioLimit;

Loading…
Cancel
Save