- Initiated work on torrent labeling/categorization (functional but not perfect yet

This commit is contained in:
Christophe Dumez 2009-12-15 19:52:43 +00:00
parent 21eb26a374
commit ed803fb994
10 changed files with 390 additions and 96 deletions

View file

@ -198,7 +198,7 @@ void Bittorrent::setUploadLimit(QString hash, long val) {
void Bittorrent::handleDownloadFailure(QString url, QString reason) {
emit downloadFromUrlFailure(url, reason);
// Clean up
QUrl qurl = QUrl::fromEncoded(url.toLocal8Bit());
QUrl qurl = QUrl::fromEncoded(url.toLocal8Bit());
int index = url_skippingDlg.indexOf(qurl);
if(index >= 0)
url_skippingDlg.removeAt(index);
@ -910,6 +910,10 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
}
// Save persistent data for new torrent
TorrentPersistentData::saveTorrentPersistentData(h);
// Save Label
if(TorrentTempData::hasTempData(hash)) {
TorrentPersistentData::saveLabel(hash, TorrentTempData::getLabel(hash));
}
// Save save_path
if(!defaultTempPath.isEmpty()) {
qDebug("addTorrent: Saving save_path in persistent data: %s", savePath.toLocal8Bit().data());