mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 03:10:12 +02:00
TWK-624: When resolving dups in dropjob, prefer playable ones
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
Reference in New Issue
Block a user