Changeset 8124


Ignore:
Timestamp:
Apr 2, 2009, 10:59:30 PM (13 years ago)
Author:
charles
Message:

(trunk rpc) add "torrentFile" to the list of allowed arguments to the "torrent-get" method

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/rpc-spec.txt

    r8123 r8124  
    198198   trackers                        | array (see below)           | n/a
    199199   totalSize                       | number                      | tr_info
     200   torrentFile                     | string                      | tr_info
    200201   uploadedEver                    | number                      | tr_stat
    201202   uploadLimit                     | number                      | tr_torrent
     
    478479         |         | yes       | torrent-get    | new arg "seedRatioLimit"
    479480         |         | yes       | torrent-get    | new arg "seedRatioMode"
     481         |         | yes       | torrent-get    | new arg "torrentFile"
    480482         |         | yes       | torrent-get    | new ids option "recently-active"
    481483         |         | yes       | torrent-get    | new ids option "percentDone"
  • trunk/libtransmission/rpcimpl.c

    r8123 r8124  
    538538    else if( !strcmp( key, "trackers" ) )
    539539        addTrackers( inf, tr_bencDictAddList( d, key, inf->trackerCount ) );
     540    else if( !strcmp( key, "torrentFile" ) )
     541        tr_bencDictAddStr( d, key, inf->torrent );
    540542    else if( !strcmp( key, "totalSize" ) )
    541543        tr_bencDictAddInt( d, key, inf->totalSize );
  • trunk/libtransmission/torrent.c

    r8123 r8124  
    591591    tr_torrentUncheck( tor );
    592592
    593     tor->addedDate = time( NULL ); /* this is a default value to be
    594                                       overwritten by the resume file */
     593    tr_torrentSetAddedDate( tor, time( NULL ) ); /* this is a default value to be
     594                                                    overwritten by the resume file */
     595
    595596    loaded = tr_torrentLoadResume( tor, ~0, ctor );
    596597
     
    19161917**/
    19171918
    1918 /** @deprecated this method will be removed in 1.40 */
    19191919void
    19201920tr_torrentSetAddedDate( tr_torrent * tor,
     
    19241924
    19251925    tor->addedDate = t;
    1926 }
    1927 
    1928 /** @deprecated this method will be removed in 1.40 */
     1926    tor->anyDate = MAX( tor->anyDate, tor->addedDate );
     1927}
     1928
    19291929void
    19301930tr_torrentSetActivityDate( tr_torrent * tor,
     
    19341934
    19351935    tor->activityDate = t;
    1936 
    1937     if( tor->anyDate < tor->activityDate )
    1938         tor->anyDate = tor->activityDate;
    1939 }
    1940 
    1941 /** @deprecated this method will be removed in 1.40 */
     1936    tor->anyDate = MAX( tor->anyDate, tor->activityDate );
     1937}
     1938
    19421939void
    19431940tr_torrentSetDoneDate( tr_torrent * tor,
     
    19471944
    19481945    tor->doneDate = t;
    1949 
    1950     if( tor->anyDate < tor->doneDate )
    1951         tor->anyDate = tor->doneDate;
     1946    tor->anyDate = MAX( tor->anyDate, tor->doneDate );
    19521947}
    19531948
Note: See TracChangeset for help on using the changeset viewer.