1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

Also check if a query has a result to determine equality, instead of only brittle string comparison

This commit is contained in:
Leo Franchi 2012-06-16 16:56:23 +02:00
parent bc6cd4008d
commit a53ef7370c

View File

@ -50,7 +50,8 @@ QueueProxyModel::onPlaybackStarted( const Tomahawk::result_ptr& result )
{
QModelIndex idx = index( i, 0 );
PlayableItem* item = itemFromIndex( mapToSource( idx ) );
if ( item && item->query() && item->query()->equals( result->toQuery() ) )
if ( item && item->query() && ( item->query()->results().contains( result ) ||
item->query()->equals( result->toQuery() ) ) )
remove( idx );
}
}