Changeset 2062
- Timestamp:
- Jun 13, 2007, 3:58:06 AM (15 years ago)
- Location:
- branches/file_selection
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/file_selection/cli/transmissioncli.c
r2046 r2062 41 41 " -c, --create-from <file> Create torrent from the specified source file.\n" 42 42 " -a, --announce <url> Used in conjunction with -c.\n" 43 " -r, --private Used in conjunction with -c.\n" 43 44 " -m, --comment <text> Adds an optional comment when creating a torrent.\n" 44 45 " -d, --download <int> Maximum download rate (-1 = no limit, default = -1)\n" … … 55 56 static int showInfo = 0; 56 57 static int showScrape = 0; 58 static int isPrivate = 0; 57 59 static int verboseLevel = 0; 58 60 static int bindPort = TR_DEFAULT_PORT; … … 132 134 133 135 if( sourceFile && *sourceFile ) /* creating a torrent */ 134 return tr_makeMetaInfo ( torrentPath, announce, comment, sourceFile ); 136 return tr_makeMetaInfo( torrentPath, 137 announce, 138 comment, 139 sourceFile, 140 isPrivate ); 135 141 136 142 /* Open and parse torrent file */ … … 313 319 { "info", no_argument, NULL, 'i' }, 314 320 { "scrape", no_argument, NULL, 's' }, 321 { "private", no_argument, NULL, 'r' }, 315 322 { "verbose", required_argument, NULL, 'v' }, 316 323 { "port", required_argument, NULL, 'p' }, … … 325 332 326 333 int c, optind = 0; 327 c = getopt_long( argc, argv, "hisv:p:u:d:f:c:n", long_options, &optind ); 334 c = getopt_long( argc, argv, "hisrv:p:u:d:f:c:m:a:n:", 335 long_options, &optind ); 328 336 if( c < 0 ) 329 337 { … … 341 349 showScrape = 1; 342 350 break; 351 case 'r': 352 isPrivate = 1; 353 break; 343 354 case 'v': 344 355 verboseLevel = atoi( optarg ); … … 356 367 finishCall = optarg; 357 368 break; 369 case 'c': 370 sourceFile = optarg; 371 break; 358 372 case 'm': 359 373 comment = optarg; 360 break;361 case 'c':362 sourceFile = optarg;363 374 break; 364 375 case 'a': -
branches/file_selection/libtransmission/makemeta.c
r2050 r2062 225 225 makeInfoDict ( benc_val_t * dict, 226 226 const char * topFile, 227 const struct FileList * files ) 227 const struct FileList * files, 228 int isPrivate ) 228 229 { 229 230 static const int pieceSize = 262144; /* 256 KiB. TODO: let user choose? */ … … 260 261 261 262 val = tr_bencDictAdd( dict, "private" ); 262 tr_bencInitInt( val, 1 ); /* TODO: let user choose? */263 tr_bencInitInt( val, isPrivate ? 1 : 0 ); 263 264 } 264 265 … … 267 268 const char * announce, 268 269 const char * comment, 269 const char * topFile ) 270 const char * topFile, 271 int isPrivate ) 270 272 { 271 273 int n = 5; … … 311 313 tr_bencInit( val, TYPE_DICT ); 312 314 tr_bencDictReserve( val, 666 ); 313 makeInfoDict( val, topFile, files );315 makeInfoDict( val, topFile, files, isPrivate ); 314 316 315 317 /* debugging... */ -
branches/file_selection/libtransmission/makemeta.h
r2046 r2062 30 30 const char * announce, /* announcement URL */ 31 31 const char * comment, /* optional comment */ 32 const char * filename); /* file or dir to torrentize */ 32 const char * filename, /* file or dir to torrentize */ 33 int isPrivate ); 33 34 34 35 #endif -
branches/file_selection/mk/gtk.mk
r1998 r2062 4 4 include ../mk/common.mk 5 5 6 SRCS = conf.c dialogs.c hig.c io.c ipc.c main.c msgwin.c \ 7 torrent-inspector.c \ 8 tr_cell_renderer_progress.c tr_core.c tr_icon.c tr_prefs.c \ 9 tr_torrent.c tr_window.c util.c 6 SRCS = actions.c conf.c dialogs.c hig.c io.c ipc.c main.c msgwin.c \ 7 torrent-inspector.c tr_cell_renderer_progress.c tr_core.c \ 8 tr_icon.c tr_prefs.c tr_torrent.c tr_window.c util.c 10 9 OBJS = $(SRCS:%.c=%.o) 11 10 12 CFLAGS += $(CFLAGS_GTK) -I../libtransmission11 CFLAGS += $(CFLAGS_GTK) 13 12 LDFLAGS += $(LDFLAGS_GTK) 14 13 LDLIBS += ../libtransmission/libtransmission.a
Note: See TracChangeset
for help on using the changeset viewer.