mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Fix bug where playable tracks were ignored in station previews
This commit is contained in:
@@ -115,11 +115,12 @@ DynamicModel::trackResolveFinished( bool success )
|
|||||||
|
|
||||||
Query* q = qobject_cast<Query*>( sender() );
|
Query* q = qobject_cast<Query*>( sender() );
|
||||||
|
|
||||||
|
qDebug() << "Got resolveFinished in DynamicModel" << q->track() << q->artist();
|
||||||
if( !m_waitingFor.contains( q ) )
|
if( !m_waitingFor.contains( q ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( !q->playable() ) {
|
if( !q->playable() ) {
|
||||||
qDebug() << "Got not resolved track:" << q->track() << q->artist() << m_lastResolvedRow << m_currentAttempts;
|
qDebug() << "Got not playable or resolved track:" << q->track() << q->artist() << m_lastResolvedRow << m_currentAttempts;
|
||||||
m_currentAttempts++;
|
m_currentAttempts++;
|
||||||
|
|
||||||
int curAttempts = m_startingAfterFailed ? m_currentAttempts - 20 : m_currentAttempts; // if we just failed, m_currentAttempts includes those failures
|
int curAttempts = m_startingAfterFailed ? m_currentAttempts - 20 : m_currentAttempts; // if we just failed, m_currentAttempts includes those failures
|
||||||
@@ -197,6 +198,7 @@ DynamicModel::filteringTrackResolved( bool successful )
|
|||||||
Q_ASSERT( q );
|
Q_ASSERT( q );
|
||||||
|
|
||||||
// if meantime the user began the station, abort
|
// if meantime the user began the station, abort
|
||||||
|
qDebug() << "Got filtering resolved finished for track, was it successful?:" << q->track() << q->artist() << successful << q->playable();
|
||||||
if( m_onDemandRunning ) {
|
if( m_onDemandRunning ) {
|
||||||
m_toResolveList.clear();
|
m_toResolveList.clear();
|
||||||
m_resolvedList.clear();
|
m_resolvedList.clear();
|
||||||
@@ -216,7 +218,7 @@ DynamicModel::filteringTrackResolved( bool successful )
|
|||||||
|
|
||||||
m_toResolveList.removeAll( realptr );
|
m_toResolveList.removeAll( realptr );
|
||||||
|
|
||||||
if( successful ) {
|
if( realptr->playable() ) {
|
||||||
m_resolvedList << realptr;
|
m_resolvedList << realptr;
|
||||||
|
|
||||||
// append and update internal lastResolvedRow
|
// append and update internal lastResolvedRow
|
||||||
@@ -230,6 +232,8 @@ DynamicModel::filteringTrackResolved( bool successful )
|
|||||||
m_resolvedList.clear();
|
m_resolvedList.clear();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
qDebug() << "Got unsuccessful resolve request for this track" << realptr->track() << realptr->artist();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_toResolveList.isEmpty() && rowCount( QModelIndex() ) == 0 ) // we failed
|
if( m_toResolveList.isEmpty() && rowCount( QModelIndex() ) == 0 ) // we failed
|
||||||
|
Reference in New Issue
Block a user