mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 16:44:05 +02:00
Don't re-fetch charts on nam change
This commit is contained in:
@@ -75,7 +75,8 @@ ChartsPlugin::namChangedSlot( QNetworkAccessManager *nam )
|
|||||||
/// Then get each chart from resource
|
/// Then get each chart from resource
|
||||||
/// We want to prepopulate the breadcrumb to fetch them before they are asked for
|
/// We want to prepopulate the breadcrumb to fetch them before they are asked for
|
||||||
|
|
||||||
if( !m_chartResources.isEmpty() && m_nam ){
|
if ( !m_chartResources.isEmpty() && m_nam && m_allChartsMap.isEmpty() )
|
||||||
|
{
|
||||||
|
|
||||||
tDebug() << "ChartsPlugin: InfoChart fetching possible resources";
|
tDebug() << "ChartsPlugin: InfoChart fetching possible resources";
|
||||||
foreach ( QVariant resource, m_chartResources )
|
foreach ( QVariant resource, m_chartResources )
|
||||||
|
@@ -66,6 +66,10 @@ SpotifyPlugin::namChangedSlot( QNetworkAccessManager *nam )
|
|||||||
|
|
||||||
m_nam = QWeakPointer< QNetworkAccessManager >( nam );
|
m_nam = QWeakPointer< QNetworkAccessManager >( nam );
|
||||||
|
|
||||||
|
// we never need to re-fetch
|
||||||
|
if ( !m_allChartsMap.isEmpty() )
|
||||||
|
return;
|
||||||
|
|
||||||
/// We need to fetch possible types before they are asked for
|
/// We need to fetch possible types before they are asked for
|
||||||
tDebug() << "SpotifyPlugin: InfoChart fetching possible resources";
|
tDebug() << "SpotifyPlugin: InfoChart fetching possible resources";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user