From c6cb208e199672e373710a20772ca7066325a29c Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Mon, 28 Jan 2013 19:56:29 +0100 Subject: [PATCH] Replace stupid fix for track dupes in ScriptCollection with a real one. --- src/libtomahawk/AlbumPlaylistInterface.cpp | 7 +++---- src/libtomahawk/resolvers/ScriptCollection.cpp | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libtomahawk/AlbumPlaylistInterface.cpp b/src/libtomahawk/AlbumPlaylistInterface.cpp index b501d7a1f..2207e94f4 100644 --- a/src/libtomahawk/AlbumPlaylistInterface.cpp +++ b/src/libtomahawk/AlbumPlaylistInterface.cpp @@ -257,10 +257,9 @@ AlbumPlaylistInterface::infoSystemFinished( const QString& infoId ) void AlbumPlaylistInterface::onTracksLoaded( const QList< query_ptr >& tracks ) { - if ( !tracks.isEmpty() && - ( tracks.first()->artist() != m_album->artist()->name() || - tracks.first()->album() != m_album->name() ) ) - return; + disconnect( m_collection.data(), SIGNAL( tracksResult( QList< Tomahawk::query_ptr > ) ), + this, SLOT( onTracksLoaded( QList< Tomahawk::query_ptr > ) ) ); + if ( m_collection.isNull() ) { m_databaseLoaded = true; diff --git a/src/libtomahawk/resolvers/ScriptCollection.cpp b/src/libtomahawk/resolvers/ScriptCollection.cpp index 93d7d9fce..3a58f0e1e 100644 --- a/src/libtomahawk/resolvers/ScriptCollection.cpp +++ b/src/libtomahawk/resolvers/ScriptCollection.cpp @@ -22,6 +22,7 @@ #include "Source.h" #include "ExternalResolverGui.h" #include "utils/TomahawkUtilsGui.h" +#include "utils/Logger.h" #include #include @@ -145,5 +146,6 @@ ScriptCollection::onAlbumsFetched( const QList& albums ) void ScriptCollection::onTracksFetched( const QList& tracks ) { + tDebug() << Q_FUNC_INFO << "About to emit tracksResult"; emit tracksResult( tracks ); }