int CDownloads::GetTryingCount(BOOL bTorrentsOnly) const
{
	int nCount = 0;
	
	for ( POSITION pos = GetIterator() ; pos ; )
	{
		CDownload* pDownload = GetNext( pos );
		
		if ( ( pDownload->IsTrying() ) && ( ! pDownload->IsCompleted() ) && ( ! pDownload->IsPaused() ) )
		{
			if ( ( pDownload->m_bBTH ) || ( ! bTorrentsOnly ) )
				nCount++;
		}
	}
	
	return nCount;
}