Changeset 2349


Ignore:
Timestamp:
Jul 15, 2007, 4:06:04 AM (15 years ago)
Author:
livings124
Message:

if a file is 100% complete, assume can download is no

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.h

    r2338 r2349  
    163163- (BOOL) isChecking;
    164164- (BOOL) allDownloaded;
     165- (BOOL) isComplete;
    165166- (BOOL) isError;
    166167- (NSString *) errorMessage;
  • trunk/macosx/Torrent.m

    r2347 r2349  
    321321                            [NSString stringForFileSize: [self downloadedValid]],
    322322                            [NSString stringForFileSize: [self size]], 100.0 * [self progress]];
    323     else if ([self progress] < 1.0)
     323    else if (![self isComplete])
    324324        [progressString appendFormat: NSLocalizedString(@"%@ of %@ (%.2f%%), uploaded %@ (Ratio: %@)",
    325325                "Torrent -> progress string"),
     
    10821082}
    10831083
     1084- (BOOL) isComplete
     1085{
     1086    return fStat->cpStatus == TR_CP_COMPLETE;
     1087}
     1088
    10841089- (BOOL) isError
    10851090{
     
    13011306- (BOOL) canChangeDownloadCheckForFiles: (NSIndexSet *) indexSet
    13021307{
    1303     if ([self fileCount] <= 1)
     1308    if ([self fileCount] <= 1 || [self isComplete])
    13041309        return NO;
    13051310   
Note: See TracChangeset for help on using the changeset viewer.