diff --git a/src/core/download_factory.cc b/src/core/download_factory.cc index 8c55e33f..fead33b9 100644 --- a/src/core/download_factory.cc +++ b/src/core/download_factory.cc @@ -300,7 +300,8 @@ DownloadFactory::initialize_rtorrent(Download* download, torrent::Object* rtorre download->download()->up_rate()->set_total(rtorrent->get_key_value("total_uploaded")); if (rtorrent->has_key_value("chunks_done")) - download->download()->set_chunks_done(std::min(rtorrent->get_key_value("chunks_done"), download->download()->file_list()->completed_chunks())); + download->download()->set_chunks_done(std::min(rtorrent->get_key_value("chunks_done"), + download->download()->file_list()->size_chunks())); if (!rtorrent->has_key_value("ignore_commands")) rtorrent->insert_key("ignore_commands", (int64_t)0);