1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00

(trunk cli) make the "creating torrent" message a little better

This commit is contained in:
Charles Kerr 2009-06-20 00:53:11 +00:00
parent 1bc1b16da7
commit d63a1eb4ba

View file

@ -298,8 +298,10 @@ main( int argc,
tr_session * h;
tr_ctor * ctor;
tr_torrent * tor = NULL;
tr_benc settings;
const char * configDir;
tr_benc settings;
const char * configDir;
tr_bool haveSource;
tr_bool haveAnnounce;
printf( "Transmission %s - http://www.transmissionbt.com/\n",
LONG_VERSION_STRING );
@ -332,10 +334,19 @@ main( int argc,
h = tr_sessionInit( "cli", configDir, FALSE, &settings );
if( sourceFile && *sourceFile ) /* creating a torrent */
haveSource = sourceFile && *sourceFile;
haveAnnounce = announceCount > 0;
if( haveSource && !haveAnnounce )
fprintf( stderr, "Did you mean to create a torrent without a tracker's announce URL?\n" );
if( haveSource ) /* creating a torrent */
{
int err;
tr_metainfo_builder * b = tr_metaInfoBuilderCreate( sourceFile );
int err;
tr_metainfo_builder * b;
fprintf( stderr, "creating torrent \"%s\"\n", torrentPath );
b = tr_metaInfoBuilderCreate( sourceFile );
tr_makeMetaInfo( b, torrentPath, announce, announceCount, comment, isPrivate );
while( !b->isDone )
{