Fixed file filtering in a torrent

This commit is contained in:
Christophe Dumez 2007-07-03 22:39:49 +00:00
parent b1ed521d6b
commit 107d2c8e7b
4 changed files with 112 additions and 112 deletions

View file

@ -427,14 +427,16 @@ void bittorrent::loadFilteredFiles(torrent_handle &h){
std::cerr << "* Error: Corrupted priorities file\n";
return;
}
std::vector<int> v;
for(unsigned int i=0; i<nbFiles; ++i){
int priority = pieces_priorities_list.at(i).toInt();
if( priority < 0 || priority > 7){
priority = 1;
}
qDebug("Setting piece piority to %d", priority);
h.piece_priority(i, priority);
v.push_back(priority);
}
h.prioritize_files(v);
}
// Save fastresume data for all torrents