From 5d427d2acfc5f55845bd6ee26726fee3182a8e62 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 20 Nov 2009 18:36:34 +0000 Subject: [PATCH] - Save fast resume data for paused torrents too to avoid loosing information (e.g. user trackers, ...) --- src/bittorrent.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 9001812dc..f04d9b13d 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -867,6 +867,12 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr if(!from_url.isNull()) QFile::remove(file); return h; } + // FIXME: Remove this debug + std::vector trackers = h.trackers(); + std::vector::iterator it; + for(it=trackers.begin(); it!=trackers.end(); it++) { + qDebug("* Tracker: %s", it->url.c_str()); + } // Connections limit per torrent h.set_max_connections(Preferences::getMaxConnecsPerTorrent()); // Uploads limit per torrent @@ -1092,7 +1098,8 @@ void Bittorrent::saveFastResumeData() { if(!h.is_valid() || !h.has_metadata()) continue; if(isQueueingEnabled()) TorrentPersistentData::savePriority(h); - if(h.is_paused()) continue; + // Actually with should save fast resume data for paused files too + //if(h.is_paused()) continue; if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking) continue; h.save_resume_data(); ++num_resume_data;