From 4ff5ea5e66e146cc5354b89befe33c12c8bc03e7 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 16 Jun 2008 23:27:38 +0000 Subject: [PATCH] make sure the events for "finished downloading" occur if it finishes seeding (for ratio) at the same time --- macosx/Torrent.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/macosx/Torrent.m b/macosx/Torrent.m index d0cc727d6..cc8af6da0 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -1830,7 +1830,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void * //status has been retained - (void) completenessChange: (NSNumber *) status { - [self update]; + fStat = tr_torrentStat(fHandle); //don't call update yet to avoid auto-stop BOOL canMove; switch ([status intValue]) @@ -1866,7 +1866,6 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void * //allow to be backed up by Time Machine [self setTimeMachineExclude: NO forPath: [[self downloadFolder] stringByAppendingPathComponent: [self name]]]; - fStat = tr_torrentStat(fHandle); [[NSNotificationCenter defaultCenter] postNotificationName: @"TorrentFinishedDownloading" object: self]; break; @@ -1878,6 +1877,8 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void * break; } [status release]; + + [self update]; } - (void) quickPause