mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 21:57:41 +02:00
Also allow multiple infoplugins to return data for artist top tracks
This commit is contained in:
@@ -112,6 +112,10 @@ ArtistPlaylistInterface::tracks()
|
|||||||
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
||||||
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
||||||
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
||||||
|
|
||||||
|
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
||||||
|
SIGNAL( finished( QString ) ),
|
||||||
|
SLOT( infoSystemFinished( QString ) ) );
|
||||||
}
|
}
|
||||||
else if ( m_mode == DatabaseMode && !m_databaseLoaded )
|
else if ( m_mode == DatabaseMode && !m_databaseLoaded )
|
||||||
{
|
{
|
||||||
@@ -176,9 +180,23 @@ ArtistPlaylistInterface::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData r
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !m_queries.isEmpty() )
|
||||||
|
infoSystemFinished( id() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ArtistPlaylistInterface::infoSystemFinished( const QString &infoId )
|
||||||
|
{
|
||||||
|
if ( infoId != id() )
|
||||||
|
return;
|
||||||
|
|
||||||
m_infoSystemLoaded = true;
|
m_infoSystemLoaded = true;
|
||||||
|
|
||||||
disconnect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
disconnect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
||||||
this, SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
this, SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
||||||
|
disconnect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( finished( QString ) ),
|
||||||
|
this, SLOT( infoSystemFinished( QString) ) );
|
||||||
|
|
||||||
if ( m_queries.isEmpty() && m_mode == Mixed )
|
if ( m_queries.isEmpty() && m_mode == Mixed )
|
||||||
{
|
{
|
||||||
|
@@ -60,6 +60,7 @@ signals:
|
|||||||
private slots:
|
private slots:
|
||||||
void onTracksLoaded( const QList< Tomahawk::query_ptr >& tracks );
|
void onTracksLoaded( const QList< Tomahawk::query_ptr >& tracks );
|
||||||
void infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output );
|
void infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output );
|
||||||
|
void infoSystemFinished( const QString& infoId );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY( ArtistPlaylistInterface )
|
Q_DISABLE_COPY( ArtistPlaylistInterface )
|
||||||
|
Reference in New Issue
Block a user