1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

Only cache spotify charts for a week, and send defaults

This commit is contained in:
Leo Franchi 2011-10-28 12:30:26 -04:00
parent 4ffbd839eb
commit 58b625ef03

View File

@ -140,7 +140,7 @@ SpotifyPlugin::fetchChart( Tomahawk::InfoSystem::InfoRequestData requestData )
criteria["chart_id"] = hash["chart_id"];
}
emit getCachedInfo( criteria, 0, requestData );
emit getCachedInfo( criteria, 604800000 /* Expire chart cache in 1 week */, requestData );
}
void
SpotifyPlugin::fetchChartCapabilities( Tomahawk::InfoSystem::InfoRequestData requestData )
@ -268,7 +268,7 @@ SpotifyPlugin::chartTypes()
}
QVariantMap defaultMap;
defaultMap[ "Spotify" ] = QStringList() << "United States" << "Top Albums";
defaultMap[ "spotify" ] = QStringList() << "United States" << "Top Albums";
m_allChartsMap[ "defaults" ] = defaultMap;
m_allChartsMap.insert( "Spotify", QVariant::fromValue<QVariantMap>( charts ) );