diff --git a/macosx/Torrent.h b/macosx/Torrent.h index 4ad2cf0bd..f7161fd05 100644 --- a/macosx/Torrent.h +++ b/macosx/Torrent.h @@ -50,9 +50,8 @@ int fUploadLimit, fDownloadLimit; float fRatioLimit; - BOOL fLimitCustom, fCheckUpload, fCheckDownload, - fRatioCustom, fShouldStopAtRatio, - fFinishedSeeding, fWaitToStart, fError; + BOOL fLimitCustom, fCheckUpload, fCheckDownload, fRatioCustom, fShouldStopAtRatio, + fFinishedSeeding, fWaitToStart, fError, fChecking; int fOrderValue; diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 0626e6150..76527632d 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -290,10 +290,12 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 [NSString stringForFileSize: [self size]], [NSString stringForFileSize: [self uploadedTotal]], [NSString stringForRatio: [self ratio]]]; + BOOL wasChecking = fChecking; + fChecking = NO; switch (fStat->status) { NSString * tempString; - + case TR_STATUS_PAUSE: if (fWaitToStart) { @@ -318,6 +320,8 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 [fShortStatusString setString: tempString]; [fRemainingTimeString setString: tempString]; + fChecking = YES; + break; case TR_STATUS_DOWNLOAD: @@ -368,8 +372,8 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 [fStatusString appendFormat: NSLocalizedString(@"Seeding to %d of %d peers", "Torrent -> status string"), [self peersDownloading], [self totalPeers]]; else - [fStatusString appendFormat: NSLocalizedString(@"Seeding to %d of %d peer", "Torrent -> status string"), - [self peersDownloading], [self totalPeers]]; + [fStatusString appendFormat: NSLocalizedString(@"Seeding to %d of 1 peer", "Torrent -> status string"), + [self peersDownloading]]; break; @@ -382,6 +386,9 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 break; } + if (wasChecking && !fChecking) + [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateQueue" object: self]; + if (fStat->error) { [fStatusString setString: [NSLocalizedString(@"Error: ", "Torrent -> status string") stringByAppendingString: