1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-22 08:52:12 +02:00

TWK-624: When resolving dups in dropjob, prefer playable ones

This commit is contained in:
Leo Franchi 2012-02-25 23:20:31 -05:00
parent b7f1f56f77
commit cbb5bac075

@ -701,10 +701,18 @@ DropJob::removeDuplicates()
{
bool contains = false;
foreach( const Tomahawk::query_ptr &tmpItem, list )
{
if ( item->album() == tmpItem->album()
&& item->artist() == tmpItem->artist()
&& item->track() == tmpItem->track() )
{
if ( item->playable() && !tmpItem->playable() )
list.replace( list.indexOf( tmpItem ), item );
contains = true;
break;
}
}
if ( !contains )
list.append( item );
}