Ignore:
Timestamp:
Dec 9, 2008, 5:01:49 PM (12 years ago)
Author:
charles
Message:

(daemon) #1510: kysucix's patch to give an option to delete local data via RPC when removing a torrent.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rpcimpl.c

    r7238 r7331  
    137137
    138138static const char*
    139 torrentRemove( tr_handle *        h,
    140                tr_benc *          args_in,
    141                tr_benc * args_out UNUSED )
    142 {
    143     int           i, torrentCount;
     139torrentRemove( tr_handle   * h,
     140               tr_benc     * args_in,
     141               tr_benc     * args_out UNUSED )
     142{
     143    int i;
     144    int torrentCount;
    144145    tr_torrent ** torrents = getTorrents( h, args_in, &torrentCount );
    145146
    146     for( i = 0; i < torrentCount; ++i )
    147     {
    148         tr_torrent *                 tor = torrents[i];
    149         const tr_rpc_callback_status status = notify(
    150             h, TR_RPC_TORRENT_REMOVING, tor );
     147    for( i=0; i<torrentCount; ++i )
     148    {
     149        tr_torrent * tor = torrents[i];
     150        const tr_rpc_callback_status status = notify( h, TR_RPC_TORRENT_REMOVING, tor );
     151        int64_t deleteFlag;
     152        if( tr_bencDictFindInt( args_in, "delete-local-data", &deleteFlag ) && deleteFlag )
     153            tr_torrentDeleteLocalData( tor );
    151154        if( !( status & TR_RPC_NOREMOVE ) )
    152155            tr_torrentRemove( tor );
Note: See TracChangeset for help on using the changeset viewer.