Changeset 10391


Ignore:
Timestamp:
Mar 17, 2010, 7:23:03 PM (12 years ago)
Author:
charles
Message:

(trunk) #2898 "add pausing and deletion to daemon" -- committed patch from Longinus00 to trunk for 2.00

Location:
trunk
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r10386 r10391  
    384384if test "x$enable_nls" = "xyes" ; then
    385385    use_nls=yes
    386     IT_PROG_INTLTOOL([0.40.0],[no-xml])
     386    IT_PROG_INTLTOOL([0.35.0],[no-xml])
    387387    AC_CHECK_HEADERS([libintl.h])
    388388    GETTEXT_PACKAGE=transmission
  • trunk/daemon/daemon.c

    r10281 r10391  
    218218onFileAdded( tr_session * session, const char * dir, const char * file )
    219219{
    220     if( strstr( file, ".torrent" ) != NULL )
    221     {
    222         char * filename = tr_buildPath( dir, file, NULL );
    223         tr_ctor * ctor = tr_ctorNew( session );
    224 
    225         int err = tr_ctorSetMetainfoFromFile( ctor, filename );
    226         if( !err )
    227             tr_torrentNew( ctor, &err );
    228 
    229         tr_ctorFree( ctor );
    230         tr_free( filename );
    231     }
     220    char * filename = tr_buildPath( dir, file, NULL );
     221    tr_ctor * ctor = tr_ctorNew( session );
     222    int err = tr_ctorSetMetainfoFromFile( ctor, filename );
     223
     224    if( !err )
     225    {
     226        tr_torrentNew( ctor, &err );
     227
     228        if( err == TR_PARSE_ERR )
     229            tr_err( "Error parsing .torrent file \"%s\"", file );
     230        else
     231        {
     232            tr_bool trash = FALSE;
     233            int test = tr_ctorGetDeleteSource( ctor, &trash );
     234
     235            tr_inf( "Parsing .torrent file successful \"%s\"", file );
     236
     237            if( !test && trash )
     238            {
     239                tr_inf( "Deleting input .torrent file \"%s\"", file );
     240                if( remove( filename ) )
     241                    tr_err( "Error deleting .torrent file: %s", tr_strerror( errno ) );
     242            }
     243        }
     244    }
     245
     246    tr_ctorFree( ctor );
     247    tr_free( filename );
    232248}
    233249
  • trunk/daemon/remote.c

    r10390 r10391  
    115115    { 'S', "stop",                  "Stop the current torrent(s)", "S",  0, NULL },
    116116    { 't', "torrent",               "Set the current torrent(s)", "t",  1, "<torrent>" },
     117    { 990, "start-paused",          "Start added torrents paused", 0, NULL },
     118    { 991, "no-start-paused",       "Start added torrents unpaused", 0, NULL },
     119    { 992, "trash-torrent",         "Delete torrents after adding", 0, NULL },
     120    { 993, "no-trash-torrent",      "Do not delete torrents after adding", 0, NULL },
    117121    { 980, "torrent-downlimit",     "Set the maximum download speed for the current torrent(s) in KB/s", "td",  1, "<speed>" },
    118122    { 981, "no-torrent-downlimit",  "Don't limit the download speed for the current torrent(s)", "TD",  0, NULL },
     
    798802                break;
    799803
     804            case 990:
     805                tr_bencDictAddStr( &top, "method", "session-set" );
     806                tr_bencDictAddBool( args, TR_PREFS_KEY_START, FALSE );
     807                break;
     808
     809            case 991:
     810                tr_bencDictAddStr( &top, "method", "session-set" );
     811                tr_bencDictAddBool( args, TR_PREFS_KEY_START, TRUE );
     812                break;
     813
     814            case 992:
     815                tr_bencDictAddStr( &top, "method", "session-set" );
     816                tr_bencDictAddBool( args, TR_PREFS_KEY_TRASH_ORIGINAL, TRUE );
     817                break;
     818
     819            case 993:
     820                tr_bencDictAddStr( &top, "method", "session-set" );
     821                tr_bencDictAddBool( args, TR_PREFS_KEY_TRASH_ORIGINAL, FALSE );
     822                break;
     823
    800824            case TR_OPT_ERR:
    801825                fprintf( stderr, "invalid option\n" );
     
    11391163            }
    11401164        }
     1165        printf( "\n" );
     1166
     1167        printf( "MISC\n" );
     1168        if( tr_bencDictFindBool( args, TR_PREFS_KEY_START, &boolVal ) )
     1169            printf( "  Autostart added torrents: %s\n", ( boolVal ? "Yes" : "No" ) );
     1170        if( tr_bencDictFindBool( args, TR_PREFS_KEY_TRASH_ORIGINAL, &boolVal ) )
     1171            printf( "  Delete automatically added torrents: %s\n", ( boolVal ? "Yes" : "No" ) );
    11411172    }
    11421173}
  • trunk/daemon/transmission-remote.1

    r10148 r10391  
    210210.It Fl S Fl -stop
    211211Stop the current torrent(s) from downloading or seeding
     212.It Fl -start-paused
     213Start added torrents paused
     214.It fl -no-start-paused
     215Start added torrents unpaused
    212216.It Fl t Fl -torrent Ar all | id | torrent-hash
    213217Set the current torrent(s) for use by subsequent options.
     
    231235.It Fl TU Fl -no-torrent-uplimit
    232236Don't use the current torrent(s) upload limit.
     237.It Fl -trash-torrent
     238Delete torrents after adding
     239.It Fl -no-trash-torrent
     240Do not delete torrents after adding
    233241.It Fl hl Fl -honor-session
    234242Make the current torrent(s) honor the session limits.
  • trunk/doc/rpc-spec.txt

    r10288 r10391  
    3883884.1.  Session Arguments
    389389
    390    string                     | value type & description
    391    ---------------------------+-------------------------------------------------
    392    "alt-speed-down"           | number     max global download speed (in K/s)
    393    "alt-speed-enabled"        | boolean    true means use the alt speeds
    394    "alt-speed-time-begin"     | number     when to turn on alt speeds (units: minutes after midnight)
    395    "alt-speed-time-enabled"   | boolean    true means the scheduled on/off times are used
    396    "alt-speed-time-end"       | number     when to turn off alt speeds (units: same)
    397    "alt-speed-time-day"       | number     what day(s) to turn on alt speeds (look at tr_sched_day)
    398    "alt-speed-up"             | number     max global upload speed (in K/s)
    399    "blocklist-enabled"        | boolean    true means enabled
    400    "blocklist-size"           | number     number of rules in the blocklist
    401    "download-dir"             | string     default path to download torrents
    402    "dht-enabled"              | boolean    true means allow dht in public torrents
    403    "encryption"               | string     "required", "preferred", "tolerated"
    404    "incomplete-dir"           | string     path for incomplete torrents, when enabled
    405    "incomplete-dir-enabled"   | boolean    true means keep torrents in incomplete-dir until done
    406    "peer-limit-global"        | number     maximum global number of peers
    407    "peer-limit-per-torrent"   | number     maximum global number of peers
    408    "pex-enabled"              | boolean    true means allow pex in public torrents
    409    "peer-port"                | number     port number
    410    "peer-port-random-on-start"| boolean    true means pick a random peer port on launch
    411    "port-forwarding-enabled"  | boolean    true means enabled
    412    "rename-partial-files"     | boolean    true means append ".part" to incomplete files
    413    "rpc-version"              | number     the current RPC API version
    414    "rpc-version-minimum"      | number     the minimum RPC API version supported
    415    "seedRatioLimit"           | double     the default seed ratio for torrents to use
    416    "seedRatioLimited"         | boolean    true if seedRatioLimit is honored by default
    417    "speed-limit-down"         | number     max global download speed (in K/s)
    418    "speed-limit-down-enabled" | boolean    true means enabled
    419    "speed-limit-up"           | number     max global upload speed (in K/s)
    420    "speed-limit-up-enabled"   | boolean    true means enabled
    421    "version"                  | string     long version string "$version ($revision)"
     390   string                        | value type & description
     391   ------------------------------+-------------------------------------------------
     392   "alt-speed-down"              | number     max global download speed (in K/s)
     393   "alt-speed-enabled"           | boolean    true means use the alt speeds
     394   "alt-speed-time-begin"        | number     when to turn on alt speeds (units: minutes after midnight)
     395   "alt-speed-time-enabled"      | boolean    true means the scheduled on/off times are used
     396   "alt-speed-time-end"          | number     when to turn off alt speeds (units: same)
     397   "alt-speed-time-day"          | number     what day(s) to turn on alt speeds (look at tr_sched_day)
     398   "alt-speed-up"                | number     max global upload speed (in K/s)
     399   "blocklist-enabled"           | boolean    true means enabled
     400   "blocklist-size"              | number     number of rules in the blocklist
     401   "download-dir"                | string     default path to download torrents
     402   "dht-enabled"                 | boolean    true means allow dht in public torrents
     403   "encryption"                  | string     "required", "preferred", "tolerated"
     404   "incomplete-dir"              | string     path for incomplete torrents, when enabled
     405   "incomplete-dir-enabled"      | boolean    true means keep torrents in incomplete-dir until done
     406   "peer-limit-global"           | number     maximum global number of peers
     407   "peer-limit-per-torrent"      | number     maximum global number of peers
     408   "pex-enabled"                 | boolean    true means allow pex in public torrents
     409   "peer-port"                   | number     port number
     410   "peer-port-random-on-start"   | boolean    true means pick a random peer port on launch
     411   "port-forwarding-enabled"     | boolean    true means enabled
     412   "rename-partial-files"        | boolean    true means append ".part" to incomplete files
     413   "rpc-version"                 | number     the current RPC API version
     414   "rpc-version-minimum"         | number     the minimum RPC API version supported
     415   "seedRatioLimit"              | double     the default seed ratio for torrents to use
     416   "seedRatioLimited"            | boolean    true if seedRatioLimit is honored by default
     417   "speed-limit-down"            | number     max global download speed (in K/s)
     418   "speed-limit-down-enabled"    | boolean    true means enabled
     419   "speed-limit-up"              | number     max global upload speed (in K/s)
     420   "speed-limit-up-enabled"      | boolean    true means enabled
     421   "start-added-torrents"        | boolean    true means added torrents will be started right away
     422   "trash-original-torrent-files"| boolean    true means the .torrent file of added torrents will be deleted
     423   "version"                     | string     long version string "$version ($revision)"
    422424
    423425   "rpc-version" indicates the RPC interface version supported by the RPC server.
     
    586588   ------+---------+-----------+----------------+-------------------------------
    587589   8     | 1.92    | yes       | torrent-get    | new trackerStats arg "lastScrapeTimedOut"
     590   ------+---------+-----------+----------------+-------------------------------
     591   9     | 2.00    | yes       | session-set    | new arg "start-added-torrents"
     592         | 2.00    | yes       | session-set    | new arg "trash-original-torrent-files"
     593         | 2.00    | yes       | session-get    | new arg "start-added-torrents"
     594         | 2.00    | yes       | session-get    | new arg "trash-original-torrent-files"
  • trunk/gtk/conf.c

    r10383 r10391  
    203203    tr_bencDictAddBool( d, PREF_KEY_SORT_REVERSED, FALSE );
    204204    tr_bencDictAddBool( d, PREF_KEY_COMPACT_VIEW, FALSE );
    205 
    206     tr_bencDictAddBool( d, PREF_KEY_START, TRUE );
    207     tr_bencDictAddBool( d, PREF_KEY_TRASH_ORIGINAL, FALSE );
    208205}
    209206
  • trunk/gtk/main.c

    r10292 r10391  
    13011301        tr_sessionSetIncompleteDirEnabled( tr, pref_flag_get( key ) );
    13021302    }
     1303    else if( !strcmp( key, TR_PREFS_KEY_START) )
     1304    {
     1305        tr_sessionSetPaused( tr, !pref_flag_get( key ) );
     1306    }
     1307    else if( !strcmp( key, TR_PREFS_KEY_TRASH_ORIGINAL ) )
     1308    {
     1309        tr_sessionSetDeleteSource( tr, pref_flag_get( key ) );
     1310    }
    13031311}
    13041312
  • trunk/gtk/tr-core.c

    r10374 r10391  
    456456{
    457457    if( tr_ctorGetPaused( ctor, TR_FORCE, NULL ) )
    458         tr_ctorSetPaused( ctor, TR_FORCE, !pref_flag_get( PREF_KEY_START ) );
     458        tr_ctorSetPaused( ctor, TR_FORCE, !pref_flag_get( TR_PREFS_KEY_START ) );
    459459
    460460    if( tr_ctorGetDeleteSource( ctor, NULL ) )
    461461        tr_ctorSetDeleteSource( ctor,
    462                                pref_flag_get( PREF_KEY_TRASH_ORIGINAL ) );
     462                               pref_flag_get( TR_PREFS_KEY_TRASH_ORIGINAL ) );
    463463
    464464    if( tr_ctorGetPeerLimit( ctor, TR_FORCE, NULL ) )
     
    949949tr_core_add_ctor( TrCore * core, tr_ctor * ctor )
    950950{
    951     const gboolean doStart = pref_flag_get( PREF_KEY_START );
     951    const gboolean doStart = pref_flag_get( TR_PREFS_KEY_START );
    952952    const gboolean doPrompt = pref_flag_get( PREF_KEY_OPTIONS_PROMPT );
    953953    tr_core_apply_defaults( ctor );
     
    11371137                  gboolean       doNotify )
    11381138{
    1139     const gboolean doStart = pref_flag_eval( start, PREF_KEY_START );
     1139    const gboolean doStart = pref_flag_eval( start, TR_PREFS_KEY_START );
    11401140    const gboolean doPrompt = pref_flag_eval( prompt, PREF_KEY_OPTIONS_PROMPT );
    11411141    GSList * l;
  • trunk/gtk/tr-prefs.c

    r10127 r10391  
    291291
    292292    s = _( "_Start when added" );
    293     w = new_check_button( s, PREF_KEY_START, core );
     293    w = new_check_button( s, TR_PREFS_KEY_START, core );
    294294    hig_workarea_add_wide_control( t, &row, w );
    295295
    296296    s = _( "Mo_ve .torrent file to the trash" );
    297     w = new_check_button( s, PREF_KEY_TRASH_ORIGINAL, core );
     297    w = new_check_button( s, TR_PREFS_KEY_TRASH_ORIGINAL, core );
    298298    hig_workarea_add_wide_control( t, &row, w );
    299299
  • trunk/gtk/tr-prefs.h

    r10383 r10391  
    3434#define PREF_KEY_SHOW_MORE_PEER_INFO               "show-extra-peer-details"
    3535#define PREF_KEY_SHOW_BACKUP_TRACKERS              "show-backup-trackers"
    36 #define PREF_KEY_START                             "start-added-torrents"
    37 #define PREF_KEY_TRASH_ORIGINAL                    "trash-original-torrent-files"
    3836#define PREF_KEY_ASKQUIT                           "prompt-before-exit"
    3937#define PREF_KEY_SORT_MODE                         "sort-mode"
  • trunk/libtransmission/rpcimpl.c

    r10288 r10391  
    12031203    if( tr_bencDictFindBool( args_in, "seedRatioLimited", &boolVal ) )
    12041204        tr_sessionSetRatioLimited( session, boolVal );
     1205    if( tr_bencDictFindBool( args_in, TR_PREFS_KEY_START, &boolVal ) )
     1206        tr_sessionSetPaused( session, !boolVal );
     1207    if( tr_bencDictFindBool( args_in, TR_PREFS_KEY_TRASH_ORIGINAL, &boolVal ) )
     1208        tr_sessionSetDeleteSource( session, boolVal );
    12051209    if( tr_bencDictFindInt( args_in, TR_PREFS_KEY_DSPEED, &i ) )
    12061210        tr_sessionSetSpeedLimit( session, TR_DOWN, i );
     
    13071311    tr_bencDictAddReal( d, "seedRatioLimit", tr_sessionGetRatioLimit( s ) );
    13081312    tr_bencDictAddBool( d, "seedRatioLimited", tr_sessionIsRatioLimited( s ) );
     1313    tr_bencDictAddBool( d, TR_PREFS_KEY_START, !tr_sessionGetPaused( s ) );
     1314    tr_bencDictAddBool( d, TR_PREFS_KEY_TRASH_ORIGINAL, tr_sessionGetDeleteSource( s ) );
    13091315    tr_bencDictAddInt ( d, TR_PREFS_KEY_USPEED, tr_sessionGetSpeedLimit( s, TR_UP ) );
    13101316    tr_bencDictAddBool( d, TR_PREFS_KEY_USPEED_ENABLED, tr_sessionIsSpeedLimited( s, TR_UP ) );
  • trunk/libtransmission/session.c

    r10390 r10391  
    297297    tr_bencDictAddStr ( d, TR_PREFS_KEY_BIND_ADDRESS_IPV4,        TR_DEFAULT_BIND_ADDRESS_IPV4 );
    298298    tr_bencDictAddStr ( d, TR_PREFS_KEY_BIND_ADDRESS_IPV6,        TR_DEFAULT_BIND_ADDRESS_IPV6 );
     299    tr_bencDictAddBool( d, TR_PREFS_KEY_START,                    TRUE );
     300    tr_bencDictAddBool( d, TR_PREFS_KEY_TRASH_ORIGINAL,           FALSE );
    299301
    300302    tr_free( incompleteDir );
     
    359361    tr_bencDictAddStr ( d, TR_PREFS_KEY_BIND_ADDRESS_IPV4,        tr_ntop_non_ts( &s->public_ipv4->addr ) );
    360362    tr_bencDictAddStr ( d, TR_PREFS_KEY_BIND_ADDRESS_IPV6,        tr_ntop_non_ts( &s->public_ipv6->addr ) );
     363    tr_bencDictAddBool( d, TR_PREFS_KEY_START,                    !tr_sessionGetPaused( s ) );
     364    tr_bencDictAddBool( d, TR_PREFS_KEY_TRASH_ORIGINAL,           tr_sessionGetDeleteSource( s ) );
    361365}
    362366
     
    671675    if( tr_bencDictFindBool( settings, TR_PREFS_KEY_BLOCKLIST_ENABLED, &boolVal ) )
    672676        tr_blocklistSetEnabled( session, boolVal );
     677    if( tr_bencDictFindBool( settings, TR_PREFS_KEY_START, &boolVal ) )
     678        tr_sessionSetPaused( session, !boolVal );
     679    if( tr_bencDictFindBool( settings, TR_PREFS_KEY_TRASH_ORIGINAL, &boolVal) )
     680        tr_sessionSetDeleteSource( session, boolVal );
    673681
    674682    /* files and directories */
     
    14611469
    14621470    return session->peerLimitPerTorrent;
     1471}
     1472
     1473/***
     1474****
     1475***/
     1476
     1477void
     1478tr_sessionSetPaused( tr_session * session, tr_bool isPaused )
     1479{
     1480    assert( tr_isSession( session ) );
     1481
     1482    session->pauseAddedTorrent = isPaused;
     1483}
     1484
     1485tr_bool
     1486tr_sessionGetPaused( const tr_session * session )
     1487{
     1488    assert( tr_isSession( session ) );
     1489
     1490    return session->pauseAddedTorrent;
     1491}
     1492
     1493void
     1494tr_sessionSetDeleteSource( tr_session * session, tr_bool deleteSource )
     1495{
     1496    assert( tr_isSession( session ) );
     1497
     1498    session->deleteSourceTorrent = deleteSource;
     1499}
     1500
     1501tr_bool
     1502tr_sessionGetDeleteSource( const tr_session * session )
     1503{
     1504    assert( tr_isSession( session ) );
     1505
     1506    return session->deleteSourceTorrent;
    14631507}
    14641508
  • trunk/libtransmission/session.h

    r10366 r10391  
    9393    tr_bool                      isRatioLimited;
    9494    tr_bool                      isIncompleteDirEnabled;
     95    tr_bool                      pauseAddedTorrent;
     96    tr_bool                      deleteSourceTorrent;
    9597
    9698    tr_benc                      removedTorrents;
  • trunk/libtransmission/torrent-ctor.c

    r10084 r10391  
    453453    ctor->session = session;
    454454    ctor->bandwidthPriority = TR_PRI_NORMAL;
    455     tr_ctorSetPaused( ctor, TR_FALLBACK, FALSE );
     455    tr_ctorSetPaused( ctor, TR_FALLBACK, tr_sessionGetPaused( session ) );
     456    tr_ctorSetDeleteSource( ctor, tr_sessionGetDeleteSource( session ) );
    456457    if( session != NULL ) {
    457458        tr_ctorSetPeerLimit( ctor, TR_FALLBACK, session->peerLimitPerTorrent );
  • trunk/libtransmission/transmission.h

    r10390 r10391  
    206206#define TR_PREFS_KEY_UMASK                      "umask"
    207207#define TR_PREFS_KEY_UPLOAD_SLOTS_PER_TORRENT   "upload-slots-per-torrent"
     208#define TR_PREFS_KEY_START                      "start-added-torrents"
     209#define TR_PREFS_KEY_TRASH_ORIGINAL             "trash-original-torrent-files"
    208210
    209211
     
    727729void            tr_torrentSetPriority( tr_torrent *, tr_priority_t );
    728730
     731void       tr_sessionSetPaused        ( tr_session *, tr_bool isPaused );
     732tr_bool    tr_sessionGetPaused        ( const tr_session * );
     733
     734void       tr_sessionSetDeleteSource  ( tr_session *, tr_bool deleteSource );
     735tr_bool    tr_sessionGetDeleteSource  ( const tr_session * );
    729736
    730737/**
  • trunk/qt/prefs.cc

    r10384 r10391  
    3939    { SHOW_TRAY_ICON, "show-notification-area-icon", QVariant::Bool },
    4040    { SHOW_DESKTOP_NOTIFICATION, "show-desktop-notification", QVariant::Bool },
    41     { START, "start-added-torrents", QVariant::Bool },
    42     { TRASH_ORIGINAL, "trash-original-torrent-files", QVariant::Bool },
    4341    { ASKQUIT, "prompt-before-exit", QVariant::Bool },
    4442    { SORT_MODE, "sort-mode", TrTypes::SortModeType },
     
    9088    { PEER_PORT_RANDOM_HIGH, TR_PREFS_KEY_PEER_PORT_RANDOM_HIGH, QVariant::Int },
    9189    { SOCKET_TOS, TR_PREFS_KEY_PEER_SOCKET_TOS, QVariant::Int },
     90    { START, TR_PREFS_KEY_START, QVariant::Bool },
     91    { TRASH_ORIGINAL, TR_PREFS_KEY_TRASH_ORIGINAL, QVariant::Bool },
    9292    { PEX_ENABLED, TR_PREFS_KEY_PEX_ENABLED, QVariant::Bool },
    9393    { DHT_ENABLED, TR_PREFS_KEY_DHT_ENABLED, QVariant::Bool },
     
    258258    tr_bencDictAddInt( d, keyStr(SORT_REVERSED), false );
    259259    tr_bencDictAddInt( d, keyStr(COMPACT_VIEW), false );
    260     tr_bencDictAddInt( d, keyStr(START), true );
    261     tr_bencDictAddInt( d, keyStr(TRASH_ORIGINAL), false );
    262260    tr_bencDictAddStr( d, keyStr(SESSION_REMOTE_HOST), "localhost" );
    263261    tr_bencDictAddInt( d, keyStr(SESSION_REMOTE_PORT), atoi(TR_DEFAULT_RPC_PORT_STR) );
  • trunk/qt/prefs.h

    r10384 r10391  
    4242            SHOW_TRAY_ICON,
    4343            SHOW_DESKTOP_NOTIFICATION,
    44             START,
    45             TRASH_ORIGINAL,
    4644            ASKQUIT,
    4745            SORT_MODE,
     
    9492            PEER_PORT_RANDOM_HIGH,
    9593            SOCKET_TOS,
     94            START,
     95            TRASH_ORIGINAL,
    9696            PEX_ENABLED,
    9797            DHT_ENABLED,
  • trunk/qt/session.cc

    r10110 r10391  
    148148        case Prefs :: DSPEED_ENABLED:
    149149        case Prefs :: DSPEED:
     150        case Prefs :: START:
     151        case Prefs :: TRASH_ORIGINAL:
    150152        case Prefs :: PEX_ENABLED:
    151153        case Prefs :: PORT_FORWARDING:
  • trunk/web/javascript/common.js

    r10280 r10391  
    331331Prefs.prototype = { };
    332332
    333 Prefs._AutoStart          = 'auto-start-torrents';
    334 
    335333Prefs._RefreshRate        = 'refresh_rate';
    336334Prefs._SessionRefreshRate        = 'session_refresh_rate';
     
    363361Prefs._Defaults =
    364362{
    365         'auto-start-torrents': true,
    366363        'filter': 'all',
    367364        'refresh_rate' : 5,
  • trunk/web/javascript/transmission.js

    r10378 r10391  
    631631                // handle the clutch prefs locally
    632632                var tr = this;
    633                 tr.setPref( Prefs._AutoStart, $('#prefs_form #auto_start')[0].checked );
    634633                var rate = parseInt( $('#prefs_form #refresh_rate')[0].value );
    635634                if( rate != tr[Prefs._RefreshRate] ) {
     
    641640                // pass the new prefs upstream to the RPC server
    642641                var o = { };
     642                o[RPC._StartAddedTorrent]    = $('#prefs_form #auto_start')[0].checked;
    643643                o[RPC._PeerPort]             = parseInt( $('#prefs_form #port')[0].value );
    644644                o[RPC._UpSpeedLimit]         = parseInt( $('#prefs_form #upload_rate')[0].value );
     
    926926                $('div.download_location input')[0].value = prefs[RPC._DownloadDir];
    927927                $('div.port input')[0].value              = prefs[RPC._PeerPort];
    928                 $('div.auto_start input')[0].checked      = prefs[Prefs._AutoStart];
     928                $('div.auto_start input')[0].checked      = prefs[RPC._StartAddedTorrent];
    929929                $('input#limit_download')[0].checked      = down_limited;
    930930                $('input#download_rate')[0].value         = down_limit;
     
    16321632                                $('input#torrent_upload_file').attr('value', '');
    16331633                                $('input#torrent_upload_url').attr('value', '');
    1634                                 $('input#torrent_auto_start').attr('checked', this[Prefs._AutoStart]);
     1634                                $('input#torrent_auto_start').attr('checked', $('#prefs_form #auto_start')[0].checked);
    16351635                                $('#upload_container').show();
    16361636                        if (!iPhone && Safari3) {
  • trunk/web/javascript/transmission.remote.js

    r10353 r10391  
    2929RPC._TurtleTimeEnd          = 'alt-speed-time-end';
    3030RPC._TurtleTimeDay          = 'alt-speed-time-day';
     31RPC._StartAddedTorrent      = 'start-added-torrents';
    3132
    3233function TransmissionRemote( controller )
Note: See TracChangeset for help on using the changeset viewer.