mirror of
https://github.com/transmission/transmission
synced 2024-12-24 00:34:04 +00:00
if a file is 100% complete, assume can download is no
This commit is contained in:
parent
1c7c8072b4
commit
b77b25bc02
2 changed files with 8 additions and 2 deletions
|
@ -162,6 +162,7 @@
|
|||
- (BOOL) isPaused;
|
||||
- (BOOL) isChecking;
|
||||
- (BOOL) allDownloaded;
|
||||
- (BOOL) isComplete;
|
||||
- (BOOL) isError;
|
||||
- (NSString *) errorMessage;
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
[progressString appendFormat: NSLocalizedString(@"%@ of %@ (%.2f%%)", "Torrent -> progress string"),
|
||||
[NSString stringForFileSize: [self downloadedValid]],
|
||||
[NSString stringForFileSize: [self size]], 100.0 * [self progress]];
|
||||
else if ([self progress] < 1.0)
|
||||
else if (![self isComplete])
|
||||
[progressString appendFormat: NSLocalizedString(@"%@ of %@ (%.2f%%), uploaded %@ (Ratio: %@)",
|
||||
"Torrent -> progress string"),
|
||||
[NSString stringForFileSize: [self downloadedValid]], [NSString stringForFileSize: [self size]],
|
||||
|
@ -1081,6 +1081,11 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
return fStat->cpStatus != TR_CP_INCOMPLETE;
|
||||
}
|
||||
|
||||
- (BOOL) isComplete
|
||||
{
|
||||
return fStat->cpStatus == TR_CP_COMPLETE;
|
||||
}
|
||||
|
||||
- (BOOL) isError
|
||||
{
|
||||
return fStat->error != 0;
|
||||
|
@ -1300,7 +1305,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
|||
|
||||
- (BOOL) canChangeDownloadCheckForFiles: (NSIndexSet *) indexSet
|
||||
{
|
||||
if ([self fileCount] <= 1)
|
||||
if ([self fileCount] <= 1 || [self isComplete])
|
||||
return NO;
|
||||
|
||||
int index;
|
||||
|
|
Loading…
Reference in a new issue