Ignore:
Timestamp:
Apr 18, 2009, 11:17:30 PM (13 years ago)
Author:
charles
Message:

(trunk) experimental support for tr_torrentSetPriority()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rpcimpl.c

    r8233 r8254  
    410410    else if( !strcmp( key, "announceURL" ) )
    411411        tr_bencDictAddStr( d, key, st->announceURL );
     412    else if( !strcmp( key, "bandwidthPriority" ) )
     413        tr_bencDictAddInt( d, key, tr_torrentGetPriority( tor ) );
    412414    else if( !strcmp( key, "comment" ) )
    413415        tr_bencDictAddStr( d, key, inf->comment ? inf->comment : "" );
     
    722724        tr_torrent * tor = torrents[i];
    723725
     726        if( tr_bencDictFindInt( args_in, "bandwidthPriority", &tmp ) )
     727            if( tr_isPriority( tmp ) )
     728                tr_torrentSetPriority( tor, tmp );
    724729        if( tr_bencDictFindList( args_in, "files-unwanted", &files ) )
    725730            setFileDLs( tor, FALSE, files );
Note: See TracChangeset for help on using the changeset viewer.