Changeset 3423


Ignore:
Timestamp:
Oct 15, 2007, 6:44:39 PM (15 years ago)
Author:
livings124
Message:

remove reliance on completion status

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r3421 r3423  
    677677{
    678678    return fStat->percentComplete;
     679    //return (float)[self haveTotal] / [self size];
    679680}
    680681
     
    682683{
    683684    return fStat->percentDone;
     685    /*uint64_t have = [self haveTotal];
     686    return (float)have / (have + [self sizeLeft]);*/
    684687}
    685688
    686689- (float) progressLeft
    687 {//NSLog(@"left %f",(float)fStat->leftUntilDone / [self size]);
     690{
     691    //NSLog(@"left %f",(float)fStat->leftUntilDone / [self size]);
    688692    return (float)[self sizeLeft] / [self size];
    689693}
     
    719723
    720724- (float) notAvailableDesired
    721 {//NSLog(@"not available %f", (float)(fStat->desiredSize - fStat->desiredAvailable) / [self size]);
     725{
     726    //NSLog(@"not available %f", (float)(fStat->desiredSize - fStat->desiredAvailable) / [self size]);
    722727    return (float)(fStat->desiredSize - fStat->desiredAvailable) / [self size];
    723728}
     
    11771182        [self updateFileStat];
    11781183   
    1179     return [self fileCount] > 1 && fileStat[index].completionStatus != TR_CP_COMPLETE;
     1184    return [self fileCount] > 1 && fileStat[index].progress < 1.0;
    11801185}
    11811186
     
    11901195    int index;
    11911196    for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index])
    1192         if (fileStat[index].completionStatus != TR_CP_COMPLETE)
     1197        if (fileStat[index].progress < 1.0)
    11931198            return YES;
    11941199    return NO;
Note: See TracChangeset for help on using the changeset viewer.