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() {