From 576a886937896968318dea6b388616beb1bc7d1c Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Mon, 17 Oct 2011 17:04:29 -0400 Subject: [PATCH] Try deduping better --- src/libtomahawk/playlist/dynamic/DynamicModel.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libtomahawk/playlist/dynamic/DynamicModel.cpp b/src/libtomahawk/playlist/dynamic/DynamicModel.cpp index eef2bdb3c..5265878df 100644 --- a/src/libtomahawk/playlist/dynamic/DynamicModel.cpp +++ b/src/libtomahawk/playlist/dynamic/DynamicModel.cpp @@ -97,7 +97,13 @@ void DynamicModel::newTrackGenerated( const Tomahawk::query_ptr& query ) { if( m_onDemandRunning ) { - if ( m_deduper.contains( QPair< QString, QString >( query->track(), query->artist() ) ) ) + bool isDuplicate = false; + for ( int i = 0; i < m_deduper.size(); i++ ) + { + if ( m_deduper[ i ].first == query->track() && m_deduper[ i ].second == query->artist() ) + isDuplicate = true; + } + if ( isDuplicate ) { m_playlist->generator()->fetchNext();