mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 21:14:33 +00:00
Don't put finished torrents in seed_mode.
Seed mode has special function in libtorrent. It is used to skip hash checking when adding a torrent and consider it complete.
This commit is contained in:
parent
f7c8a499d5
commit
bfd30dcabc
@ -1088,7 +1088,7 @@ bool Session::addTorrent_impl(const AddTorrentData &addData, const MagnetUri &ma
|
|||||||
|
|
||||||
// Seeding mode
|
// Seeding mode
|
||||||
// Skip checking and directly start seeding (new in libtorrent v0.15)
|
// Skip checking and directly start seeding (new in libtorrent v0.15)
|
||||||
if (addData.hasSeedStatus)
|
if (addData.skipChecking)
|
||||||
p.flags |= libt::add_torrent_params::flag_seed_mode;
|
p.flags |= libt::add_torrent_params::flag_seed_mode;
|
||||||
else
|
else
|
||||||
p.flags &= ~libt::add_torrent_params::flag_seed_mode;
|
p.flags &= ~libt::add_torrent_params::flag_seed_mode;
|
||||||
@ -2363,6 +2363,7 @@ bool loadTorrentResumeData(const QByteArray &data, AddTorrentData &out, MagnetUr
|
|||||||
{
|
{
|
||||||
out = AddTorrentData();
|
out = AddTorrentData();
|
||||||
out.resumed = true;
|
out.resumed = true;
|
||||||
|
out.skipChecking = false;
|
||||||
|
|
||||||
libt::lazy_entry fast;
|
libt::lazy_entry fast;
|
||||||
libt::error_code ec;
|
libt::error_code ec;
|
||||||
|
@ -133,7 +133,8 @@ AddTorrentData::AddTorrentData(const AddTorrentParams &in)
|
|||||||
, savePath(in.savePath)
|
, savePath(in.savePath)
|
||||||
, disableTempPath(in.disableTempPath)
|
, disableTempPath(in.disableTempPath)
|
||||||
, sequential(in.sequential)
|
, sequential(in.sequential)
|
||||||
, hasSeedStatus(in.skipChecking)
|
, hasSeedStatus(false)
|
||||||
|
, skipChecking(in.skipChecking)
|
||||||
, addForced(in.addForced)
|
, addForced(in.addForced)
|
||||||
, addPaused(in.addPaused)
|
, addPaused(in.addPaused)
|
||||||
, filePriorities(in.filePriorities)
|
, filePriorities(in.filePriorities)
|
||||||
|
@ -90,6 +90,7 @@ namespace BitTorrent
|
|||||||
bool disableTempPath;
|
bool disableTempPath;
|
||||||
bool sequential;
|
bool sequential;
|
||||||
bool hasSeedStatus;
|
bool hasSeedStatus;
|
||||||
|
bool skipChecking;
|
||||||
TriStateBool addForced;
|
TriStateBool addForced;
|
||||||
TriStateBool addPaused;
|
TriStateBool addPaused;
|
||||||
// for new torrents
|
// for new torrents
|
||||||
|
Loading…
x
Reference in New Issue
Block a user