mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
Enable caching of two more infotypes
This commit is contained in:
@@ -358,7 +358,7 @@ LastFmPlugin::fetchArtistImages( uint requestId, const QString &caller, const In
|
|||||||
void
|
void
|
||||||
LastFmPlugin::notInCacheSlot( uint requestId, const QHash<QString, QString> criteria, const QString caller, const Tomahawk::InfoSystem::InfoType type, const QVariant input, const QVariantMap customData )
|
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() )
|
if ( !lastfm::nam() )
|
||||||
{
|
{
|
||||||
@@ -476,7 +476,7 @@ LastFmPlugin::similarArtistsReturned()
|
|||||||
InfoCriteriaHash origData = reply->property( "origData" ).value< Tomahawk::InfoSystem::InfoCriteriaHash >();
|
InfoCriteriaHash origData = reply->property( "origData" ).value< Tomahawk::InfoSystem::InfoCriteriaHash >();
|
||||||
Tomahawk::InfoSystem::InfoCriteriaHash criteria;
|
Tomahawk::InfoSystem::InfoCriteriaHash criteria;
|
||||||
criteria["artist"] = origData["artist"];
|
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 >();
|
InfoCriteriaHash origData = reply->property( "origData" ).value< Tomahawk::InfoSystem::InfoCriteriaHash >();
|
||||||
Tomahawk::InfoSystem::InfoCriteriaHash criteria;
|
Tomahawk::InfoSystem::InfoCriteriaHash criteria;
|
||||||
criteria["artist"] = origData["artist"];
|
criteria["artist"] = origData["artist"];
|
||||||
//emit updateCache( criteria, 2419200000, type, returnedData );
|
emit updateCache( criteria, 2419200000, type, returnedData );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -75,8 +75,8 @@ enum InfoType { // as items are saved in cache, mark them here to not change the
|
|||||||
InfoArtistNews = 29,
|
InfoArtistNews = 29,
|
||||||
InfoArtistProfile = 30,
|
InfoArtistProfile = 30,
|
||||||
InfoArtistReviews = 31,
|
InfoArtistReviews = 31,
|
||||||
InfoArtistSongs = 32,
|
InfoArtistSongs = 32, //cached -- do not change
|
||||||
InfoArtistSimilars = 33,
|
InfoArtistSimilars = 33, //cached -- do not change
|
||||||
InfoArtistTerms = 34,
|
InfoArtistTerms = 34,
|
||||||
InfoArtistLinks = 35,
|
InfoArtistLinks = 35,
|
||||||
InfoArtistVideos = 36,
|
InfoArtistVideos = 36,
|
||||||
|
@@ -180,7 +180,7 @@ InfoSystemWorker::getInfo( QString caller, InfoType type, QVariant input, QVaria
|
|||||||
qint64 currMs = QDateTime::currentMSecsSinceEpoch();
|
qint64 currMs = QDateTime::currentMSecsSinceEpoch();
|
||||||
m_timeRequestMapper.insert( currMs + timeoutMillis, requestId );
|
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;
|
m_dataTracker[ caller ][ type ] = m_dataTracker[ caller ][ type ] + 1;
|
||||||
qDebug() << "current count in dataTracker for type" << type << "is" << m_dataTracker[ caller ][ type ];
|
qDebug() << "current count in dataTracker for type" << type << "is" << m_dataTracker[ caller ][ type ];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user