mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-26 15:25:04 +02:00
Don't abuse score when doing fulltext-resolving.
This commit is contained in:
@@ -83,7 +83,7 @@ DatabaseCommand_Resolve::resolve( DatabaseImpl* lib )
|
||||
// STEP 1
|
||||
QList< QPair<int, float> > tracks = lib->search( m_query );
|
||||
|
||||
if ( tracks.length() == 0 )
|
||||
if ( tracks.isEmpty() )
|
||||
{
|
||||
qDebug() << "No candidates found in first pass, aborting resolve" << m_query->queryTrack()->toString();
|
||||
emit results( m_query->id(), res );
|
||||
@@ -202,7 +202,7 @@ DatabaseCommand_Resolve::fullTextResolve( DatabaseImpl* lib )
|
||||
emit albums( m_query->id(), albumList );
|
||||
}
|
||||
|
||||
if ( trackPairs.length() == 0 )
|
||||
if ( trackPairs.isEmpty() )
|
||||
{
|
||||
qDebug() << "No candidates found in first pass, aborting resolve" << m_query->fullTextQuery();
|
||||
emit results( m_query->id(), res );
|
||||
@@ -279,15 +279,6 @@ DatabaseCommand_Resolve::fullTextResolve( DatabaseImpl* lib )
|
||||
result->setRID( uuid() );
|
||||
result->setResolvedByCollection( s->dbCollection() );
|
||||
|
||||
for ( int k = 0; k < trackPairs.count(); k++ )
|
||||
{
|
||||
if ( trackPairs.at( k ).first == (int)track->trackId() )
|
||||
{
|
||||
//FIXME: result->setScore( trackPairs.at( k ).second );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
res << result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user