|
|
@ -132,6 +132,8 @@ CreateTorrentParams::CreateTorrentParams(const AddTorrentParams ¶ms) |
|
|
|
, category(params.category) |
|
|
|
, category(params.category) |
|
|
|
, tags(params.tags) |
|
|
|
, tags(params.tags) |
|
|
|
, savePath(params.savePath) |
|
|
|
, savePath(params.savePath) |
|
|
|
|
|
|
|
, uploadLimit(params.uploadLimit) |
|
|
|
|
|
|
|
, downloadLimit(params.downloadLimit) |
|
|
|
, disableTempPath(params.disableTempPath) |
|
|
|
, disableTempPath(params.disableTempPath) |
|
|
|
, sequential(params.sequential) |
|
|
|
, sequential(params.sequential) |
|
|
|
, firstLastPiecePriority(params.firstLastPiecePriority) |
|
|
|
, firstLastPiecePriority(params.firstLastPiecePriority) |
|
|
@ -144,8 +146,6 @@ CreateTorrentParams::CreateTorrentParams(const AddTorrentParams ¶ms) |
|
|
|
, paused(params.addPaused == TriStateBool::Undefined |
|
|
|
, paused(params.addPaused == TriStateBool::Undefined |
|
|
|
? Session::instance()->isAddTorrentPaused() |
|
|
|
? Session::instance()->isAddTorrentPaused() |
|
|
|
: params.addPaused == TriStateBool::True) |
|
|
|
: params.addPaused == TriStateBool::True) |
|
|
|
, uploadLimit(params.uploadLimit) |
|
|
|
|
|
|
|
, downloadLimit(params.downloadLimit) |
|
|
|
|
|
|
|
, filePriorities(params.filePriorities) |
|
|
|
, filePriorities(params.filePriorities) |
|
|
|
, ratioLimit(params.ignoreShareLimits ? TorrentHandleImpl::NO_RATIO_LIMIT : TorrentHandleImpl::USE_GLOBAL_RATIO) |
|
|
|
, ratioLimit(params.ignoreShareLimits ? TorrentHandleImpl::NO_RATIO_LIMIT : TorrentHandleImpl::USE_GLOBAL_RATIO) |
|
|
|
, seedingTimeLimit(params.ignoreShareLimits ? TorrentHandleImpl::NO_SEEDING_TIME_LIMIT : TorrentHandleImpl::USE_GLOBAL_SEEDING_TIME) |
|
|
|
, seedingTimeLimit(params.ignoreShareLimits ? TorrentHandleImpl::NO_SEEDING_TIME_LIMIT : TorrentHandleImpl::USE_GLOBAL_SEEDING_TIME) |
|
|
@ -166,21 +166,16 @@ TorrentHandleImpl::TorrentHandleImpl(Session *session, const lt::torrent_handle |
|
|
|
: QObject(session) |
|
|
|
: QObject(session) |
|
|
|
, m_session(session) |
|
|
|
, m_session(session) |
|
|
|
, m_nativeHandle(nativeHandle) |
|
|
|
, m_nativeHandle(nativeHandle) |
|
|
|
, m_state(TorrentState::Unknown) |
|
|
|
|
|
|
|
, m_renameCount(0) |
|
|
|
|
|
|
|
, m_useAutoTMM(params.savePath.isEmpty()) |
|
|
|
|
|
|
|
, m_name(params.name) |
|
|
|
, m_name(params.name) |
|
|
|
, m_savePath(Utils::Fs::toNativePath(params.savePath)) |
|
|
|
, m_savePath(Utils::Fs::toNativePath(params.savePath)) |
|
|
|
, m_category(params.category) |
|
|
|
, m_category(params.category) |
|
|
|
, m_tags(params.tags) |
|
|
|
, m_tags(params.tags) |
|
|
|
, m_hasSeedStatus(params.hasSeedStatus) |
|
|
|
|
|
|
|
, m_ratioLimit(params.ratioLimit) |
|
|
|
, m_ratioLimit(params.ratioLimit) |
|
|
|
, m_seedingTimeLimit(params.seedingTimeLimit) |
|
|
|
, m_seedingTimeLimit(params.seedingTimeLimit) |
|
|
|
|
|
|
|
, m_hasSeedStatus(params.hasSeedStatus) |
|
|
|
, m_tempPathDisabled(params.disableTempPath) |
|
|
|
, m_tempPathDisabled(params.disableTempPath) |
|
|
|
, m_fastresumeDataRejected(false) |
|
|
|
|
|
|
|
, m_hasMissingFiles(false) |
|
|
|
|
|
|
|
, m_hasRootFolder(params.hasRootFolder) |
|
|
|
, m_hasRootFolder(params.hasRootFolder) |
|
|
|
, m_needsToSetFirstLastPiecePriority(false) |
|
|
|
, m_useAutoTMM(params.savePath.isEmpty()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (m_useAutoTMM) |
|
|
|
if (m_useAutoTMM) |
|
|
|
m_savePath = Utils::Fs::toNativePath(m_session->categorySavePath(m_category)); |
|
|
|
m_savePath = Utils::Fs::toNativePath(m_session->categorySavePath(m_category)); |
|
|
|