BOOL CDownloadWithSources::AddSourceHit(const CMatchFile* pMatchFile, BOOL bForce)
{
	BOOL bRet = FALSE;

	// Best goes first if forced
	const CQueryHit* pBestHit = pMatchFile->GetBest();
	if ( bForce && pBestHit )
		bRet = AddSourceHit( pBestHit, TRUE );

	for ( const CQueryHit* pHit = pMatchFile->GetHits() ; pHit; pHit = pHit->m_pNext )
	{
		if ( bForce )
		{
			// Best already added
			if ( pHit != pBestHit )
				bRet = AddSourceHit( pHit, TRUE ) || bRet;
		}
		else
		{
			bRet = AddSourceHit( pHit, FALSE ) || bRet;
		}
	}

	return bRet;
}
BOOL CDownloadWithSources::OnQueryHits(CQueryHit* pHits)
{
	for ( ; pHits ; pHits = pHits->m_pNext )
	{
		if ( pHits->m_sURL.GetLength() ) AddSourceHit( pHits );
	}

	return TRUE;
}
BOOL CDownloadWithSources::OnQueryHits(const CQueryHit* pHits)
{
	for ( const CQueryHit* pHit = pHits ; pHit ; pHit = pHit->m_pNext )
	{
		AddSourceHit( pHit );
	}

	return TRUE;
}