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