|
|
@ -2593,14 +2593,12 @@ entry QBtSession::generateFilePriorityResumeData(boost::intrusive_ptr<torrent_in |
|
|
|
rd["info-hash"] = std::string((char*)info_hash.begin(), (char*)info_hash.end()); |
|
|
|
rd["info-hash"] = std::string((char*)info_hash.begin(), (char*)info_hash.end()); |
|
|
|
// Priorities
|
|
|
|
// Priorities
|
|
|
|
entry::list_type priorities; |
|
|
|
entry::list_type priorities; |
|
|
|
priorities.resize(fp.size()); |
|
|
|
|
|
|
|
for(uint i=0; i<fp.size(); ++i) { |
|
|
|
for(uint i=0; i<fp.size(); ++i) { |
|
|
|
priorities.push_back(entry(fp[i])); |
|
|
|
priorities.push_back(entry(fp[i])); |
|
|
|
} |
|
|
|
} |
|
|
|
rd["file_priority"] = entry(priorities); |
|
|
|
rd["file_priority"] = entry(priorities); |
|
|
|
// files sizes (useless but required)
|
|
|
|
// files sizes (useless but required)
|
|
|
|
entry::list_type sizes; |
|
|
|
entry::list_type sizes; |
|
|
|
sizes.resize(t->num_files()); |
|
|
|
|
|
|
|
for(int i=0; i<t->num_files(); ++i) { |
|
|
|
for(int i=0; i<t->num_files(); ++i) { |
|
|
|
entry::list_type p; |
|
|
|
entry::list_type p; |
|
|
|
p.push_back(entry(0)); |
|
|
|
p.push_back(entry(0)); |
|
|
@ -2610,7 +2608,6 @@ entry QBtSession::generateFilePriorityResumeData(boost::intrusive_ptr<torrent_in |
|
|
|
rd["file sizes"] = entry(sizes); |
|
|
|
rd["file sizes"] = entry(sizes); |
|
|
|
// Slots
|
|
|
|
// Slots
|
|
|
|
entry::list_type tslots; |
|
|
|
entry::list_type tslots; |
|
|
|
|
|
|
|
|
|
|
|
for(int i=0; i<t->num_pieces(); ++i) { |
|
|
|
for(int i=0; i<t->num_pieces(); ++i) { |
|
|
|
tslots.push_back(-1); |
|
|
|
tslots.push_back(-1); |
|
|
|
} |
|
|
|
} |
|
|
|