Ignore:
Timestamp:
Nov 30, 2008, 1:52:45 AM (12 years ago)
Author:
charles
Message:

#1379 lay some very early groundwork for "partial seeds" -- change tr_completion's enum to use the partial seed terminology

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/completion.c

    r7173 r7199  
    303303tr_cpGetStatus( const tr_completion * cp )
    304304{
    305     if( cp->sizeNow == cp->tor->info.totalSize ) return TR_CP_COMPLETE;
    306     if( cp->sizeNow == tr_cpSizeWhenDone( cp ) ) return TR_CP_DONE;
    307     return TR_CP_INCOMPLETE;
     305    if( cp->sizeNow == cp->tor->info.totalSize ) return TR_SEED;
     306    if( cp->sizeNow == tr_cpSizeWhenDone( cp ) ) return TR_PARTIAL_SEED;
     307    return TR_LEECH;
    308308}
    309309
     
    355355    const tr_torrent * tor = cp->tor;
    356356    const float        interval = tor->info.pieceCount / (float)tabCount;
    357     const int          isComplete = tr_cpGetStatus ( tor->completion ) ==
    358                                     TR_CP_COMPLETE;
     357    const int          isSeed = tr_cpGetStatus ( tor->completion ) == TR_SEED;
    359358
    360359    for( i = 0; i < tabCount; ++i )
     
    364363        if( tor == NULL )
    365364            tab[i] = 0.0f;
    366         else if( isComplete || tr_cpPieceIsComplete( cp, piece ) )
     365        else if( isSeed || tr_cpPieceIsComplete( cp, piece ) )
    367366            tab[i] = 1.0f;
    368367        else
Note: See TracChangeset for help on using the changeset viewer.