mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
* Fix re-resolving queries when index refreshed / sources came online.
This commit is contained in:
@@ -80,28 +80,30 @@ Pipeline::resolve( const QList<query_ptr>& qlist, bool prioritized )
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
QMutexLocker lock( &m_mut );
|
QMutexLocker lock( &m_mut );
|
||||||
|
|
||||||
|
int i = 0;
|
||||||
foreach( const query_ptr& q, qlist )
|
foreach( const query_ptr& q, qlist )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << (qlonglong)q.data() << q->toString();
|
qDebug() << Q_FUNC_INFO << (qlonglong)q.data() << q->toString();
|
||||||
if( !m_qids.contains( q->id() ) )
|
if ( !m_qids.contains( q->id() ) )
|
||||||
{
|
{
|
||||||
m_qids.insert( q->id(), q );
|
m_qids.insert( q->id(), q );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if ( m_queries_pending.contains( q ) )
|
||||||
{
|
{
|
||||||
qDebug() << "Already queued for resolving:" << q->toString();
|
qDebug() << "Already queued for resolving:" << q->toString();
|
||||||
return;
|
continue;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( prioritized )
|
if ( prioritized )
|
||||||
{
|
{
|
||||||
for( int i = qlist.count() - 1; i >= 0; i-- )
|
m_queries_pending.insert( i++, q );
|
||||||
m_queries_pending.insert( 0, qlist.at( i ) );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_queries_pending.append( qlist );
|
m_queries_pending.append( q );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user