Changeset 961 for trunk/macosx/Torrent.m


Ignore:
Timestamp:
Sep 29, 2006, 5:30:36 AM (16 years ago)
Author:
livings124
Message:

Torrents that have errors aren't counted in the queue, and when a torrent encounters an error the next torrent in the queue will start (even though that torrent might still be active).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r960 r961  
    262262    }
    263263   
    264     if( fStat->error & TR_ETRACKER )
    265         [fStatusString setString: [@"Error: " stringByAppendingString:
    266                         [NSString stringWithUTF8String: fStat->trackerError]]];
     264    if (fStat->error & TR_ETRACKER)
     265    {
     266        [fStatusString setString: [@"Error: " stringByAppendingString: [NSString stringWithUTF8String: fStat->trackerError]]];
     267        if (!fError && [self isActive])
     268        {
     269            fError = YES;
     270            if (![self isSeeding])
     271                [[NSNotificationCenter defaultCenter] postNotificationName: @"StoppedDownloading" object: self];
     272        }
     273    }
     274    else
     275    {
     276        if (fError)
     277            fError = NO;
     278    }
    267279
    268280    if ([self isActive])
     
    330342- (void) stopTransfer
    331343{
     344    fError = NO;
     345   
    332346    if ([self isActive])
    333347    {
     
    431445    NSLog(@"Volume: %@", volume);
    432446    NSLog(@"Remaining disk space: %qu (%@)", remainingSpace, [NSString stringForFileSize: remainingSpace]);
    433     NSLog(@"Progress: %f", [self progress]);
    434     NSLog(@"Torrent total size: %qu (%@)", [self size], [NSString stringForFileSize: [self size]]);
    435447    NSLog(@"Torrent remaining size: %qu (%@)", torrentRemaining, [NSString stringForFileSize: torrentRemaining]);
    436448   
     
    791803    fWaitToStart = waitToStart ? [waitToStart boolValue] : [fDefaults boolForKey: @"AutoStartDownload"];
    792804    fOrderValue = orderValue ? [orderValue intValue] : tr_torrentCount(fLib) - 1;
     805    fError = NO;
    793806   
    794807    NSString * fileType = fInfo->multifile ? NSFileTypeForHFSTypeCode('fldr') : [[self name] pathExtension];
Note: See TracChangeset for help on using the changeset viewer.