- Files / Folders can also be renamed directly from torrent addition dialog

This commit is contained in:
Christophe Dumez 2010-01-01 10:55:13 +00:00
parent 533e402bca
commit add2475700
5 changed files with 248 additions and 97 deletions

View file

@ -960,6 +960,14 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
qDebug("addTorrent: Setting download as sequential (from tmp data)");
h.prioritize_files(TorrentTempData::getFilesPriority(hash));
h.set_sequential_download(TorrentTempData::isSequential(hash));
// Import Files names from torrent addition dialog
QStringList files_path = TorrentTempData::getFilesPath(hash);
if(files_path.size() == h.num_files()) {
for(int i=0; i<h.num_files(); ++i) {
QString path = files_path.at(i);
h.rename_file(i, path);
}
}
}
QString label = TorrentTempData::getLabel(hash);
// Save persistent data for new torrent