Ignore:
Timestamp:
Apr 2, 2010, 5:57:25 PM (12 years ago)
Author:
livings124
Message:

#1869 Move the finished state to libtransmission. This setting is now remembered between launches. This also causes torrents that hit the seed ratio to not have this setting changed to unlimited until start.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r10414 r10437  
    10531053    }
    10541054
     1055    s->finished = s->percentDone == 1.0 && checkSeedRatio && (s->ratio >= seedRatio || s->ratio == TR_RATIO_INF);
     1056
    10551057    if( !checkSeedRatio || s->ratio >= seedRatio || s->ratio == TR_RATIO_INF )
    10561058        s->percentRatio = 1.0;
     
    13761378    if( !tor->isRunning )
    13771379    {
     1380        /* allow finished torrents to be resumed */
     1381        if( tor->stats.finished )
     1382            tr_torrentSetRatioMode( tor, TR_RATIOLIMIT_UNLIMITED );
     1383
    13781384        tr_verifyRemove( tor );
    13791385
     
    26162622            tr_torrentStop( tor );
    26172623
    2618             /* set to no ratio limit to allow easy restarting */
    2619             tr_torrentSetRatioMode( tor, TR_RATIOLIMIT_UNLIMITED );
    2620 
    26212624            /* maybe notify the client */
    26222625            if( tor->ratio_limit_hit_func != NULL )
Note: See TracChangeset for help on using the changeset viewer.