From ec9120adf06e729770b553ed2dfe878fa8233be2 Mon Sep 17 00:00:00 2001 From: thalieht Date: Fri, 24 Aug 2018 20:46:26 +0300 Subject: [PATCH] Save torrents priorities on torrent finished Save fastresumes for all torrents that shifted in the queue when a torrent finished. --- src/base/bittorrent/session.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 01daf8da7..19ff9714d 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -3673,8 +3673,11 @@ void Session::handleTorrentChecked(TorrentHandle *const torrent) void Session::handleTorrentFinished(TorrentHandle *const torrent) { - if (!torrent->hasError() && !torrent->hasMissingFiles()) + if (!torrent->hasError() && !torrent->hasMissingFiles()) { saveTorrentResumeData(torrent); + if (isQueueingSystemEnabled()) + handleTorrentsPrioritiesChanged(); + } emit torrentFinished(torrent); qDebug("Checking if the torrent contains torrent files to download");