saves sequential download in fastresume data
This commit is contained in:
parent
c0c65d8ee6
commit
a36da15c29
|
@ -1284,6 +1284,7 @@ int main(int ac, char* av[])
|
|||
|
||||
bool paused = h.is_paused();
|
||||
bool auto_managed = h.is_auto_managed();
|
||||
bool sequential_download = h.is_sequential_download();
|
||||
out << std::setw(13) << std::setiosflags(std::ios::left);
|
||||
if (!s.error.empty())
|
||||
{
|
||||
|
@ -1331,7 +1332,12 @@ int main(int ac, char* av[])
|
|||
{
|
||||
progress_bar_color = "32"; // green
|
||||
}
|
||||
out << " progress: " << esc("32") << s.total_done << esc("0") << " Bytes ";
|
||||
if (sequential_download)
|
||||
out << "sequential: ";
|
||||
else
|
||||
out << " progress: ";
|
||||
|
||||
out << esc("32") << s.total_done << esc("0") << " Bytes ";
|
||||
out.precision(4);
|
||||
out.width(5);
|
||||
out.fill(' ');
|
||||
|
|
|
@ -2522,6 +2522,10 @@ namespace libtorrent
|
|||
|
||||
int auto_managed_ = rd.dict_find_int_value("auto_managed", -1);
|
||||
if (auto_managed_ != -1) auto_managed(auto_managed_);
|
||||
|
||||
int sequential_ = rd.dict_find_int_value("sequential_download", -1);
|
||||
if (sequential_ != -1) set_sequential_download(sequential_);
|
||||
|
||||
if (rd.dict_find_int_value("paused")) pause();
|
||||
|
||||
lazy_entry const* trackers = rd.dict_find_list("trackers");
|
||||
|
@ -2580,6 +2584,8 @@ namespace libtorrent
|
|||
|
||||
ret["num_seeds"] = seeds;
|
||||
ret["num_downloaders"] = downloaders;
|
||||
|
||||
ret["sequential_download"] = m_sequential_download;
|
||||
|
||||
const sha1_hash& info_hash = torrent_file().info_hash();
|
||||
ret["info-hash"] = std::string((char*)info_hash.begin(), (char*)info_hash.end());
|
||||
|
|
Loading…
Reference in New Issue