store stop_when_ready flag in fastresume data

This commit is contained in:
Vladimir Golovnev (glassez) 2020-01-22 11:45:11 +03:00 committed by Arvid Norberg
parent 8013216550
commit 4054cbbaee
3 changed files with 3 additions and 0 deletions

View File

@ -156,6 +156,7 @@ namespace {
apply_flag(ret.flags, rd, "auto_managed", torrent_flags::auto_managed);
apply_flag(ret.flags, rd, "sequential_download", torrent_flags::sequential_download);
apply_flag(ret.flags, rd, "paused", torrent_flags::paused);
apply_flag(ret.flags, rd, "stop_when_ready", torrent_flags::stop_when_ready);
ret.save_path = rd.dict_find_string_value("save_path").to_string();

View File

@ -6199,6 +6199,7 @@ bool is_downloading_state(int const st)
if (m_super_seeding ) ret.flags |= torrent_flags::super_seeding;
if (is_torrent_paused()) ret.flags |= torrent_flags::paused;
if (m_auto_managed ) ret.flags |= torrent_flags::auto_managed;
if (m_stop_when_ready) ret.flags |= torrent_flags::stop_when_ready;
ret.added_time = m_added_time;
ret.completed_time = m_completed_time;

View File

@ -218,6 +218,7 @@ namespace libtorrent {
ret["max_uploads"] = atp.upload_limit;
ret["paused"] = bool(atp.flags & torrent_flags::paused);
ret["auto_managed"] = bool(atp.flags & torrent_flags::auto_managed);
ret["stop_when_ready"] = bool(atp.flags & torrent_flags::stop_when_ready);
if (!atp.file_priorities.empty())
{