From 5509e94778a3c475620da0dbec46a1ff2ec2161a Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 5 Jan 2009 22:16:08 +0000 Subject: [PATCH] - Fixed pausing of queued torrents --- src/bittorrent.cpp | 7 ------- src/qtorrenthandle.cpp | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 4b2839b6a..a1b5f20da 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -1121,13 +1121,6 @@ void bittorrent::readAlerts() { qDebug("Received finished alert for %s", h.name().toUtf8().data()); } } - if (torrent_paused_alert* p = dynamic_cast(a.get())) { - QTorrentHandle h(p->handle); - if(h.is_valid()){ - h.save_resume_data(); - qDebug("Received paused alert for %s", h.name().toUtf8().data()); - } - } else if (save_resume_data_alert* p = dynamic_cast(a.get())) { QDir torrentBackup(misc::qBittorrentPath() + "BT_backup"); QTorrentHandle h(p->handle); diff --git a/src/qtorrenthandle.cpp b/src/qtorrenthandle.cpp index b3044105c..fba68471d 100644 --- a/src/qtorrenthandle.cpp +++ b/src/qtorrenthandle.cpp @@ -319,6 +319,7 @@ void QTorrentHandle::pause() { Q_ASSERT(h.is_valid()); h.auto_managed(false); h.pause(); + h.save_resume_data(); } void QTorrentHandle::resume() {