1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-25 10:19:41 +01:00

Enable caching of two more infotypes

This commit is contained in:
Jeff Mitchell 2011-07-06 16:20:20 -04:00
parent 0bfc873559
commit eb7f3fdab4
3 changed files with 6 additions and 6 deletions

View File

@ -358,7 +358,7 @@ LastFmPlugin::fetchArtistImages( uint requestId, const QString &caller, const In
void
LastFmPlugin::notInCacheSlot( uint requestId, const QHash<QString, QString> criteria, const QString caller, const Tomahawk::InfoSystem::InfoType type, const QVariant input, const QVariantMap customData )
{
qDebug() << Q_FUNC_INFO;
qDebug() << Q_FUNC_INFO << " for requestId " << requestId;
if ( !lastfm::nam() )
{
@ -476,7 +476,7 @@ LastFmPlugin::similarArtistsReturned()
InfoCriteriaHash origData = reply->property( "origData" ).value< Tomahawk::InfoSystem::InfoCriteriaHash >();
Tomahawk::InfoSystem::InfoCriteriaHash criteria;
criteria["artist"] = origData["artist"];
// emit updateCache( criteria, 2419200000, type, returnedData );
emit updateCache( criteria, 2419200000, type, returnedData );
}
@ -509,7 +509,7 @@ LastFmPlugin::topTracksReturned()
InfoCriteriaHash origData = reply->property( "origData" ).value< Tomahawk::InfoSystem::InfoCriteriaHash >();
Tomahawk::InfoSystem::InfoCriteriaHash criteria;
criteria["artist"] = origData["artist"];
//emit updateCache( criteria, 2419200000, type, returnedData );
emit updateCache( criteria, 2419200000, type, returnedData );
}

View File

@ -75,8 +75,8 @@ enum InfoType { // as items are saved in cache, mark them here to not change the
InfoArtistNews = 29,
InfoArtistProfile = 30,
InfoArtistReviews = 31,
InfoArtistSongs = 32,
InfoArtistSimilars = 33,
InfoArtistSongs = 32, //cached -- do not change
InfoArtistSimilars = 33, //cached -- do not change
InfoArtistTerms = 34,
InfoArtistLinks = 35,
InfoArtistVideos = 36,

View File

@ -180,7 +180,7 @@ InfoSystemWorker::getInfo( QString caller, InfoType type, QVariant input, QVaria
qint64 currMs = QDateTime::currentMSecsSinceEpoch();
m_timeRequestMapper.insert( currMs + timeoutMillis, requestId );
}
qDebug() << "assigning request with requestId " << requestId;
qDebug() << "assigning request with requestId " << requestId << " and type " << type;
m_dataTracker[ caller ][ type ] = m_dataTracker[ caller ][ type ] + 1;
qDebug() << "current count in dataTracker for type" << type << "is" << m_dataTracker[ caller ][ type ];