Ignore:
Timestamp:
Apr 6, 2008, 2:32:43 PM (14 years ago)
Author:
charles
Message:

#843: download eta should consider availability

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1x/libtransmission/torrent.c

    r5313 r5537  
    625625    s->activityDate = tor->activityDate;
    626626
    627     s->eta = s->rateDownload < 0.1
    628         ? -1.0f
    629         : (s->leftUntilDone / s->rateDownload / 1024.0);
    630 
    631627    s->corruptEver     = tor->corruptCur    + tor->corruptPrev;
    632628    s->downloadedEver  = tor->downloadedCur + tor->downloadedPrev;
     
    658654        tr_bitfieldFree( availablePieces );
    659655    }
     656
     657    if( s->desiredAvailable != s->leftUntilDone )
     658        s->eta = TR_ETA_NOT_AVAIL;
     659    else if( s->rateDownload < 0.1 )
     660        s->eta = TR_ETA_UNKNOWN;
     661    else
     662        s->eta = s->leftUntilDone / (s->rateDownload / 1024.0);
    660663
    661664    s->ratio = tr_getRatio( s->uploadedEver,
Note: See TracChangeset for help on using the changeset viewer.