]> granicus.if.org Git - transmission/commitdiff
(trunk daemon) #1483: add "incomplete dir" support to transmission-remote
authorCharles Kerr <charles@transmissionbt.com>
Mon, 19 Oct 2009 05:34:00 +0000 (05:34 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Mon, 19 Oct 2009 05:34:00 +0000 (05:34 +0000)
daemon/remote.c
daemon/transmission-remote.1

index 823d272bf3e6889bd302e59518a2628ee91d9202..187a1d1de2a7987c9df20c2e2f6782a8b06c8a3d 100644 (file)
@@ -72,6 +72,8 @@ static tr_option opts[] =
     { 976, "alt-speed-time-begin", "Time to start using the alt speed limits (in hhmm)", NULL,  1, "<time>" },
     { 977, "alt-speed-time-end",   "Time to stop using the alt speed limits (in hhmm)", NULL,  1, "<time>" },
     { 978, "alt-speed-days",       "Numbers for any/all days of the week - eg. \"1-7\"", NULL,  1, "<days>" },
+    { 'c', "incomplete-dir",       "Where to store new torrents until they're complete", "c", 1, "<dir>" },
+    { 'C', "no-incomplete-dir",    "Don't store incomplete torrents in a different location", "C", 0, NULL },
     { 'b', "debug",                "Print debugging information", "b",  0, NULL },
     { 'd', "downlimit",            "Set the maximum global download speed in KB/s", "d",  1, "<speed>" },
     { 'D', "no-downlimit",         "Don't limit the global download speed", "D",  0, NULL },
@@ -414,6 +416,17 @@ readargs( int           argc,
                 addArg = FALSE;
                 break;
 
+            case 'c':
+                tr_bencDictAddStr( &top, "method", "session-set" );
+                tr_bencDictAddStr( args, TR_PREFS_KEY_INCOMPLETE_DIR, optarg );
+                tr_bencDictAddBool( args, TR_PREFS_KEY_INCOMPLETE_DIR_ENABLED, TRUE );
+                break;
+
+            case 'C':
+                tr_bencDictAddStr( &top, "method", "session-set" );
+                tr_bencDictAddBool( args, TR_PREFS_KEY_INCOMPLETE_DIR_ENABLED, FALSE );
+                break;
+
             case 'd':
                 tr_bencDictAddStr( &top, "method", "session-set" );
                 tr_bencDictAddInt( args, TR_PREFS_KEY_DSPEED, numarg( optarg ) );
index 49640814b68df7a13f6785416e8488be8d70c833..ed306b1c49a096c484663356585e3090ffab77a2 100644 (file)
@@ -19,6 +19,7 @@ and
 .Op Fl asc
 .Op Fl ASC
 .Op Fl b
+.Op Fl c Ar path | Fl C
 .Op Fl d Ar number | Fl D
 .Op Fl er | ep | et
 .Op Fl f
@@ -98,6 +99,12 @@ to stop using the alt speed limits (in hhmm).
 Set the number of
 .Ar days
 on which to enable the speed scheduler, using a list such as "2,4-6".
+.It Fl c Fl -incomplete-dir Ar dir
+When adding new torrents, store their contents in
+.Ar directory
+until the torrent is done.
+.It Fl C Fl -no-incomplete-dir
+Don't store incomplete torrents in a different directory.
 .It Fl d Fl -downlimit Ar limit
 Limit the global download speed to
 .Ar limit