mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
fix stations to use new signals
This commit is contained in:
@@ -135,13 +135,6 @@ Pipeline::reportResults( QID qid, const QList< result_ptr >& results )
|
|||||||
unsigned int state = m_qidsState.value( qid ) - 1;
|
unsigned int state = m_qidsState.value( qid ) - 1;
|
||||||
m_qidsState.insert( qid, state );
|
m_qidsState.insert( qid, state );
|
||||||
|
|
||||||
if ( state == 0 )
|
|
||||||
{
|
|
||||||
// All resolvers have reported back their results for this query now
|
|
||||||
const query_ptr& q = m_qids.value( qid );
|
|
||||||
q->onResolvingFinished();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !results.isEmpty() )
|
if ( !results.isEmpty() )
|
||||||
{
|
{
|
||||||
//qDebug() << Q_FUNC_INFO << qid;
|
//qDebug() << Q_FUNC_INFO << qid;
|
||||||
@@ -155,6 +148,14 @@ Pipeline::reportResults( QID qid, const QList< result_ptr >& results )
|
|||||||
m_rids.insert( r->id(), r );
|
m_rids.insert( r->id(), r );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( state == 0 )
|
||||||
|
{
|
||||||
|
// All resolvers have reported back their results for this query now
|
||||||
|
const query_ptr& q = m_qids.value( qid );
|
||||||
|
q->onResolvingFinished();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -216,7 +216,6 @@ DynamicWidget::generateOrStart()
|
|||||||
|
|
||||||
m_generateButton->setText( tr( "Stop" ) );
|
m_generateButton->setText( tr( "Stop" ) );
|
||||||
|
|
||||||
|
|
||||||
// show the steering controls
|
// show the steering controls
|
||||||
if( m_playlist->generator()->onDemandSteerable() ) {
|
if( m_playlist->generator()->onDemandSteerable() ) {
|
||||||
// position it horizontally centered, above the botton.
|
// position it horizontally centered, above the botton.
|
||||||
@@ -275,7 +274,7 @@ DynamicWidget::tracksGenerated( const QList< query_ptr >& queries )
|
|||||||
void
|
void
|
||||||
DynamicWidget::onDemandFetched( const Tomahawk::query_ptr& track )
|
DynamicWidget::onDemandFetched( const Tomahawk::query_ptr& track )
|
||||||
{
|
{
|
||||||
connect( track.data(), SIGNAL( resolveFailed() ), this, SLOT( trackResolveFailed() ) );
|
connect( track.data(), SIGNAL( resolvingFinished( bool ) ), this, SLOT( trackResolveFinished( bool ) ) );
|
||||||
connect( track.data(), SIGNAL( resultsAdded( QList<Tomahawk::result_ptr> ) ), this, SLOT( trackResolved() ) );
|
connect( track.data(), SIGNAL( resultsAdded( QList<Tomahawk::result_ptr> ) ), this, SLOT( trackResolved() ) );
|
||||||
|
|
||||||
m_model->append( track );
|
m_model->append( track );
|
||||||
@@ -294,13 +293,15 @@ DynamicWidget::trackResolved()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DynamicWidget::trackResolveFailed()
|
DynamicWidget::trackResolveFinished( bool success )
|
||||||
{
|
{
|
||||||
|
if( !success ) { // if it was successful, we've already gotten a trackResolved() signal
|
||||||
m_songsSinceLastResolved++;
|
m_songsSinceLastResolved++;
|
||||||
if( m_songsSinceLastResolved < 100 ) {
|
if( m_songsSinceLastResolved < 100 ) {
|
||||||
m_playlist->generator()->fetchNext();
|
m_playlist->generator()->fetchNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DynamicWidget::newTrackLoading()
|
DynamicWidget::newTrackLoading()
|
||||||
|
@@ -72,7 +72,7 @@ private slots:
|
|||||||
void onDemandFailed();
|
void onDemandFailed();
|
||||||
void newTrackLoading();
|
void newTrackLoading();
|
||||||
void onDemandFetched( const Tomahawk::query_ptr& track );
|
void onDemandFetched( const Tomahawk::query_ptr& track );
|
||||||
void trackResolveFailed();
|
void trackResolveFinished( bool );
|
||||||
void trackResolved();
|
void trackResolved();
|
||||||
|
|
||||||
void controlsChanged();
|
void controlsChanged();
|
||||||
|
Reference in New Issue
Block a user