mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Only cache spotify charts for a week, and send defaults
This commit is contained in:
@@ -140,7 +140,7 @@ SpotifyPlugin::fetchChart( Tomahawk::InfoSystem::InfoRequestData requestData )
|
|||||||
criteria["chart_id"] = hash["chart_id"];
|
criteria["chart_id"] = hash["chart_id"];
|
||||||
}
|
}
|
||||||
|
|
||||||
emit getCachedInfo( criteria, 0, requestData );
|
emit getCachedInfo( criteria, 604800000 /* Expire chart cache in 1 week */, requestData );
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SpotifyPlugin::fetchChartCapabilities( Tomahawk::InfoSystem::InfoRequestData requestData )
|
SpotifyPlugin::fetchChartCapabilities( Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||||
@@ -268,7 +268,7 @@ SpotifyPlugin::chartTypes()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QVariantMap defaultMap;
|
QVariantMap defaultMap;
|
||||||
defaultMap[ "Spotify" ] = QStringList() << "United States" << "Top Albums";
|
defaultMap[ "spotify" ] = QStringList() << "United States" << "Top Albums";
|
||||||
m_allChartsMap[ "defaults" ] = defaultMap;
|
m_allChartsMap[ "defaults" ] = defaultMap;
|
||||||
m_allChartsMap.insert( "Spotify", QVariant::fromValue<QVariantMap>( charts ) );
|
m_allChartsMap.insert( "Spotify", QVariant::fromValue<QVariantMap>( charts ) );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user