change the callback functions' orders s.t. torrent-completed is called before torrent-done

This commit is contained in:
Jordan Lee 2013-07-15 23:53:48 +00:00
parent 2db09dad54
commit 768142fcac
1 changed files with 5 additions and 3 deletions

View File

@ -2164,14 +2164,16 @@ tr_torrentRecheckCompleteness (tr_torrent * tor)
if (tor->currentDir == tor->incompleteDir)
tr_torrentSetLocation (tor, tor->downloadDir, true, NULL, NULL);
}
fireCompletenessChange (tor, completeness, wasRunning);
if (tr_torrentIsSeed (tor))
{
if (tr_sessionIsTorrentDoneScriptEnabled (tor->session))
torrentCallScript (tor, tr_sessionGetTorrentDoneScript (tor->session));
}
fireCompletenessChange (tor, completeness, wasRunning);
tr_torrentSetDirty (tor);
}