(trunk) don't display "Got a list of 0 peers" for currently paused torrents

This commit is contained in:
Daniel Lee 2010-09-16 02:00:54 +00:00
parent 09df34e4c4
commit 8f57986784
3 changed files with 9 additions and 13 deletions

View File

@ -1327,13 +1327,13 @@ printTrackersImpl( tr_benc * trackerStats )
printf( "\n" );
printf( " Tracker %d: %s\n", (int)(id), host );
if( isBackup )
printf( " Backup on tier #%d\n", (int)tier );
printf( " Backup on tier %d\n", (int)tier );
else
printf( " Active in tier #%d\n", (int)tier );
printf( " Active in tier %d\n", (int)tier );
if( !isBackup )
{
if( hasAnnounced )
if( hasAnnounced && announceState != TR_TRACKER_INACTIVE )
{
tr_strltime( buf, now - lastAnnounceTime, sizeof( buf ) );
if( lastAnnounceSucceeded )

View File

@ -1821,7 +1821,7 @@ buildTrackerSummary( const char * key, const tr_tracker_stat * st, gboolean show
if( !st->isBackup )
{
if( st->hasAnnounced )
if( st->hasAnnounced && st->announceState != TR_TRACKER_INACTIVE )
{
g_string_append_c( gstr, '\n' );
tr_strltime_rounded( timebuf, now - st->lastAnnounceTime, sizeof( timebuf ) );
@ -1840,10 +1840,8 @@ buildTrackerSummary( const char * key, const tr_tracker_stat * st, gboolean show
switch( st->announceState )
{
case TR_TRACKER_INACTIVE:
if( !st->hasAnnounced ) {
g_string_append_c( gstr, '\n' );
g_string_append( gstr, _( "No updates scheduled" ) );
}
g_string_append_c( gstr, '\n' );
g_string_append( gstr, _( "No updates scheduled" ) );
break;
case TR_TRACKER_WAITING:
tr_strltime_rounded( timebuf, st->nextAnnounceTime - now, sizeof( timebuf ) );

View File

@ -152,7 +152,7 @@ TrackerDelegate :: getText( const TrackerInfo& inf ) const
// announce & scrape info
if( !inf.st.isBackup )
{
if( inf.st.hasAnnounced )
if( inf.st.hasAnnounced && inf.st.announceState != TR_TRACKER_INACTIVE )
{
const QString tstr( timeToStringRounded( now - inf.st.lastAnnounceTime ) );
str += "<br/>\n";
@ -184,10 +184,8 @@ TrackerDelegate :: getText( const TrackerInfo& inf ) const
switch( inf.st.announceState )
{
case TR_TRACKER_INACTIVE:
if( !inf.st.hasAnnounced ) {
str += "<br/>\n";
str += tr( "No updates scheduled" );
}
str += "<br/>\n";
str += tr( "No updates scheduled" );
break;
case TR_TRACKER_WAITING: {