Changeset 3239


Ignore:
Timestamp:
Sep 30, 2007, 1:22:15 PM (15 years ago)
Author:
livings124
Message:

if there is an error still display per-torrent speeds in the main window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r3236 r3239  
    224224   
    225225    //check to stop for ratio
    226     #warning fix this!
    227226    float stopRatio;
    228227    if ([self isSeeding] && (stopRatio = [self actualStopRatio]) != INVALID && [self ratio] >= stopRatio)
     
    925924                    string = [NSString stringWithFormat: NSLocalizedString(@"Downloading from %d of 1 peer",
    926925                                                    "Torrent -> status string"), [self peersSendingToUs]];
    927                
    928                 string = [string stringByAppendingFormat: @" - DL: %@, UL: %@",
    929                             [NSString stringForSpeed: [self downloadRate]], [NSString stringForSpeed: [self uploadRate]]];
    930926                break;
    931927
     
    938934                    string = [NSString stringWithFormat: NSLocalizedString(@"Seeding to %d of 1 peer", "Torrent -> status string"),
    939935                                                    [self peersGettingFromUs]];
    940                
    941                 string = [string stringByAppendingFormat: @" - UL: %@", [NSString stringForSpeed: [self uploadRate]]];
    942936                break;
    943937
     
    952946        if (fStalled)
    953947            string = [NSLocalizedString(@"Stalled, ", "Torrent -> status string") stringByAppendingString: string];
     948       
     949        if ([self isActive] && ![self isChecking])
     950        {
     951            if (fStat->status == TR_STATUS_DOWNLOAD)
     952                string = [string stringByAppendingFormat: @" - DL: %@, UL: %@",
     953                        [NSString stringForSpeed: [self downloadRate]], [NSString stringForSpeed: [self uploadRate]]];
     954            else
     955                string = [string stringByAppendingFormat: @" - UL: %@", [NSString stringForSpeed: [self uploadRate]]];
     956        }
    954957    }
    955958   
Note: See TracChangeset for help on using the changeset viewer.