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:
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 );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user