Changeset 1602


Ignore:
Timestamp:
Mar 28, 2007, 12:53:45 PM (15 years ago)
Author:
livings124
Message:

better way of storing if torrent was active

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r1589 r1602  
    127127       
    128128        [self setDownloadFolder: downloadFolder];
    129 
     129       
     130        //start transfer
     131        BOOL start = YES;
     132        NSNumber * active;
    130133        NSString * paused;
    131         if (!(paused = [history objectForKey: @"Paused"]) || [paused isEqualToString: @"NO"])
     134        if ((active = [history objectForKey: @"Active"]))
     135            start = [active boolValue];
     136        else if ((paused = [history objectForKey: @"Paused"])) //old way of storing if active
     137            start = [paused isEqualToString: @"NO"];
     138        else;
     139       
     140        if (start)
    132141        {
    133142            fStat = tr_torrentStat(fHandle);
     
    145154                    fDownloadFolder, @"DownloadFolder",
    146155                    [NSNumber numberWithBool: fUseIncompleteFolder], @"UseIncompleteFolder",
    147                     [self isActive] ? @"NO" : @"YES", @"Paused",
     156                    [NSNumber numberWithBool: [self isActive]], @"Active",
    148157                    [self date], @"Date",
    149158                    [NSNumber numberWithInt: fRatioSetting], @"RatioSetting",
Note: See TracChangeset for help on using the changeset viewer.