From 75cf25de62a018dae10298f38cdf065b61092a1a Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 12 Aug 2012 09:56:36 +0300 Subject: [PATCH] Remember queue position for torrents without metadata (closes #17) --- src/qtlibtorrent/qbtsession.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qtlibtorrent/qbtsession.cpp b/src/qtlibtorrent/qbtsession.cpp index 82b6642b7..b811e1f75 100644 --- a/src/qtlibtorrent/qbtsession.cpp +++ b/src/qtlibtorrent/qbtsession.cpp @@ -1619,10 +1619,13 @@ void QBtSession::saveFastResumeData() { std::vector::iterator torrentITend = torrents.end(); for ( ; torrentIT != torrentITend; ++torrentIT) { QTorrentHandle h = QTorrentHandle(*torrentIT); - if (!h.is_valid() || !h.has_metadata()) continue; + if (!h.is_valid()) + continue; try { if (isQueueingEnabled()) TorrentPersistentData::savePriority(h); + if (!h.has_metadata()) + 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;