mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 07:36:48 +02:00
Massive cleanup of echonest plugin, also some cleanup for lastfmplugin. Hope I didn't break anything. :-)
This commit is contained in:
@@ -147,7 +147,7 @@ AudioEngine::stop()
|
|||||||
setCurrentTrack( Tomahawk::result_ptr() );
|
setCurrentTrack( Tomahawk::result_ptr() );
|
||||||
emit stopped();
|
emit stopped();
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoMap map;
|
Tomahawk::InfoSystem::InfoTypeMap map;
|
||||||
map[ Tomahawk::InfoSystem::InfoNowStopped ] = QVariant();
|
map[ Tomahawk::InfoSystem::InfoNowStopped ] = QVariant();
|
||||||
|
|
||||||
if ( m_waitingOnNewTrack )
|
if ( m_waitingOnNewTrack )
|
||||||
@@ -319,7 +319,7 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
|||||||
DatabaseCommand_LogPlayback* cmd = new DatabaseCommand_LogPlayback( m_currentTrack, DatabaseCommand_LogPlayback::Started );
|
DatabaseCommand_LogPlayback* cmd = new DatabaseCommand_LogPlayback( m_currentTrack, DatabaseCommand_LogPlayback::Started );
|
||||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
|
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoMap map;
|
Tomahawk::InfoSystem::InfoTypeMap map;
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoCriteriaHash trackInfo;
|
Tomahawk::InfoSystem::InfoCriteriaHash trackInfo;
|
||||||
trackInfo["title"] = m_currentTrack->track();
|
trackInfo["title"] = m_currentTrack->track();
|
||||||
|
@@ -63,7 +63,6 @@ EchoNestPlugin::namChangedSlot( QNetworkAccessManager *nam )
|
|||||||
newProxyFactory->setNoProxyHosts( oldProxyFactory->noProxyHosts() );
|
newProxyFactory->setNoProxyHosts( oldProxyFactory->noProxyHosts() );
|
||||||
newProxyFactory->setProxy( oldProxyFactory->proxy() );
|
newProxyFactory->setProxy( oldProxyFactory->proxy() );
|
||||||
currNam->setProxyFactory( newProxyFactory );
|
currNam->setProxyFactory( newProxyFactory );
|
||||||
m_nam = QWeakPointer< QNetworkAccessManager >( currNam );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -116,10 +115,10 @@ EchoNestPlugin::getArtistBiography(const QString &caller, const QVariant &input,
|
|||||||
|
|
||||||
Echonest::Artist artist( input.toString() );
|
Echonest::Artist artist( input.toString() );
|
||||||
QNetworkReply *reply = artist.fetchBiographies();
|
QNetworkReply *reply = artist.fetchBiographies();
|
||||||
reply->setProperty("artist", QVariant::fromValue<Echonest::Artist>(artist));
|
reply->setProperty( "artist", QVariant::fromValue< Echonest::Artist >( artist ) );
|
||||||
reply->setProperty( "input", input );
|
reply->setProperty( "input", input );
|
||||||
m_replyMap[reply] = customData;
|
reply->setProperty( "customData", customData );
|
||||||
m_callerMap[reply] = caller;
|
reply->setProperty( "caller", caller );
|
||||||
connect(reply, SIGNAL(finished()), SLOT(getArtistBiographySlot()));
|
connect(reply, SIGNAL(finished()), SLOT(getArtistBiographySlot()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,8 +133,8 @@ EchoNestPlugin::getArtistFamiliarity(const QString &caller, const QVariant &inpu
|
|||||||
QNetworkReply* reply = artist.fetchFamiliarity();
|
QNetworkReply* reply = artist.fetchFamiliarity();
|
||||||
reply->setProperty( "artist", QVariant::fromValue<Echonest::Artist>(artist));
|
reply->setProperty( "artist", QVariant::fromValue<Echonest::Artist>(artist));
|
||||||
reply->setProperty( "input", input );
|
reply->setProperty( "input", input );
|
||||||
m_replyMap[reply] = customData;
|
reply->setProperty( "customData", customData );
|
||||||
m_callerMap[reply] = caller;
|
reply->setProperty( "caller", caller );
|
||||||
connect(reply, SIGNAL(finished()), SLOT(getArtistFamiliaritySlot()));
|
connect(reply, SIGNAL(finished()), SLOT(getArtistFamiliaritySlot()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,8 +148,8 @@ EchoNestPlugin::getArtistHotttnesss(const QString &caller, const QVariant &input
|
|||||||
QNetworkReply* reply = artist.fetchHotttnesss();
|
QNetworkReply* reply = artist.fetchHotttnesss();
|
||||||
reply->setProperty( "artist", QVariant::fromValue<Echonest::Artist>(artist));
|
reply->setProperty( "artist", QVariant::fromValue<Echonest::Artist>(artist));
|
||||||
reply->setProperty( "input", input );
|
reply->setProperty( "input", input );
|
||||||
m_replyMap[reply] = customData;
|
reply->setProperty( "customData", customData );
|
||||||
m_callerMap[reply] = caller;
|
reply->setProperty( "caller", caller );
|
||||||
connect(reply, SIGNAL(finished()), SLOT(getArtistHotttnesssSlot()));
|
connect(reply, SIGNAL(finished()), SLOT(getArtistHotttnesssSlot()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,9 +163,9 @@ EchoNestPlugin::getArtistTerms(const QString &caller, const QVariant &input, con
|
|||||||
QNetworkReply* reply = artist.fetchTerms( Echonest::Artist::Weight );
|
QNetworkReply* reply = artist.fetchTerms( Echonest::Artist::Weight );
|
||||||
reply->setProperty( "artist", QVariant::fromValue<Echonest::Artist>(artist));
|
reply->setProperty( "artist", QVariant::fromValue<Echonest::Artist>(artist));
|
||||||
reply->setProperty( "input", input );
|
reply->setProperty( "input", input );
|
||||||
m_replyMap[reply] = customData;
|
reply->setProperty( "customData", customData );
|
||||||
m_callerMap[reply] = caller;
|
reply->setProperty( "caller", caller );
|
||||||
connect(reply, SIGNAL(finished()), SLOT(getArtistTermsSlot()));
|
connect(reply, SIGNAL( finished() ), SLOT( getArtistTermsSlot() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -174,9 +173,9 @@ EchoNestPlugin::getMiscTopTerms(const QString &caller, const QVariant &input, co
|
|||||||
{
|
{
|
||||||
Q_UNUSED( input );
|
Q_UNUSED( input );
|
||||||
QNetworkReply* reply = Echonest::Artist::topTerms( 20 );
|
QNetworkReply* reply = Echonest::Artist::topTerms( 20 );
|
||||||
m_replyMap[reply] = customData;
|
reply->setProperty( "customData", customData );
|
||||||
m_callerMap[reply] = caller;
|
reply->setProperty( "caller", caller );
|
||||||
connect( reply,SIGNAL(finished()), SLOT( getMiscTopSlot()));
|
connect( reply, SIGNAL( finished() ), SLOT( getMiscTopSlot() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -197,9 +196,11 @@ EchoNestPlugin::getArtistBiographySlot()
|
|||||||
biographyMap[biography.site()]["attribution"] = biography.license().url.toString();
|
biographyMap[biography.site()]["attribution"] = biography.license().url.toString();
|
||||||
|
|
||||||
}
|
}
|
||||||
emit info( m_callerMap[reply], Tomahawk::InfoSystem::InfoArtistBiography, reply->property( "input" ), QVariant::fromValue<Tomahawk::InfoSystem::InfoGenericMap>(biographyMap), m_replyMap[reply] );
|
emit info( reply->property( "caller" ).toString(),
|
||||||
m_replyMap.remove(reply);
|
Tomahawk::InfoSystem::InfoArtistBiography,
|
||||||
m_callerMap.remove(reply);
|
reply->property( "input" ),
|
||||||
|
QVariant::fromValue< Tomahawk::InfoSystem::InfoGenericMap >( biographyMap ),
|
||||||
|
reply->property( "customData" ).value< Tomahawk::InfoSystem::InfoCustomData >() );
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,9 +210,11 @@ EchoNestPlugin::getArtistFamiliaritySlot()
|
|||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
Echonest::Artist artist = artistFromReply( reply );
|
Echonest::Artist artist = artistFromReply( reply );
|
||||||
qreal familiarity = artist.familiarity();
|
qreal familiarity = artist.familiarity();
|
||||||
emit info( m_callerMap[reply], Tomahawk::InfoSystem::InfoArtistFamiliarity, reply->property( "input" ), familiarity, m_replyMap[reply] );
|
emit info( reply->property( "caller" ).toString(),
|
||||||
m_replyMap.remove(reply);
|
Tomahawk::InfoSystem::InfoArtistFamiliarity,
|
||||||
m_callerMap.remove(reply);
|
reply->property( "input" ),
|
||||||
|
familiarity,
|
||||||
|
reply->property( "customData" ).value< Tomahawk::InfoSystem::InfoCustomData >() );
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,9 +224,11 @@ EchoNestPlugin::getArtistHotttnesssSlot()
|
|||||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||||
Echonest::Artist artist = artistFromReply( reply );
|
Echonest::Artist artist = artistFromReply( reply );
|
||||||
qreal hotttnesss = artist.hotttnesss();
|
qreal hotttnesss = artist.hotttnesss();
|
||||||
emit info( m_callerMap[reply], Tomahawk::InfoSystem::InfoArtistHotttness, reply->property( "input" ), hotttnesss, m_replyMap[reply] );
|
emit info( reply->property( "caller" ).toString(),
|
||||||
m_replyMap.remove(reply);
|
Tomahawk::InfoSystem::InfoArtistHotttness,
|
||||||
m_callerMap.remove(reply);
|
reply->property( "input" ),
|
||||||
|
hotttnesss,
|
||||||
|
reply->property( "customData" ).value< Tomahawk::InfoSystem::InfoCustomData >() );
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -240,9 +245,11 @@ EchoNestPlugin::getArtistTermsSlot()
|
|||||||
termMap[ "frequency" ] = QString::number(term.frequency());
|
termMap[ "frequency" ] = QString::number(term.frequency());
|
||||||
termsMap[ term.name() ] = termMap;
|
termsMap[ term.name() ] = termMap;
|
||||||
}
|
}
|
||||||
emit info( m_callerMap[reply], Tomahawk::InfoSystem::InfoArtistTerms, reply->property( "input" ), QVariant::fromValue<Tomahawk::InfoSystem::InfoGenericMap>(termsMap), m_replyMap[reply] );
|
emit info( reply->property( "caller" ).toString(),
|
||||||
m_replyMap.remove(reply);
|
Tomahawk::InfoSystem::InfoArtistTerms,
|
||||||
m_callerMap.remove(reply);
|
reply->property( "input" ),
|
||||||
|
QVariant::fromValue< Tomahawk::InfoSystem::InfoGenericMap >( termsMap ),
|
||||||
|
reply->property( "customData" ).value< Tomahawk::InfoSystem::InfoCustomData >() );
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,9 +265,11 @@ EchoNestPlugin::getMiscTopSlot()
|
|||||||
termMap[ "frequency" ] = QString::number( term.frequency() );
|
termMap[ "frequency" ] = QString::number( term.frequency() );
|
||||||
termsMap[ term.name().toLower() ] = termMap;
|
termsMap[ term.name().toLower() ] = termMap;
|
||||||
}
|
}
|
||||||
emit info( m_callerMap[reply], Tomahawk::InfoSystem::InfoMiscTopTerms, QVariant(), QVariant::fromValue<Tomahawk::InfoSystem::InfoGenericMap>(termsMap), m_replyMap[reply] );
|
emit info( reply->property( "caller" ).toString(),
|
||||||
m_replyMap.remove(reply);
|
Tomahawk::InfoSystem::InfoMiscTopTerms,
|
||||||
m_callerMap.remove(reply);
|
QVariant(),
|
||||||
|
QVariant::fromValue< Tomahawk::InfoSystem::InfoGenericMap >( termsMap ),
|
||||||
|
reply->property( "customData" ).value< Tomahawk::InfoSystem::InfoCustomData >() );
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -83,11 +83,6 @@ private slots:
|
|||||||
void getArtistHotttnesssSlot();
|
void getArtistHotttnesssSlot();
|
||||||
void getArtistTermsSlot();
|
void getArtistTermsSlot();
|
||||||
void getMiscTopSlot();
|
void getMiscTopSlot();
|
||||||
|
|
||||||
private:
|
|
||||||
QHash< QNetworkReply*, InfoCustomData > m_replyMap;
|
|
||||||
QHash< QNetworkReply*, QString > m_callerMap;
|
|
||||||
QWeakPointer< QNetworkAccessManager > m_nam;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -115,9 +115,6 @@ LastFmPlugin::namChangedSlot( QNetworkAccessManager *nam )
|
|||||||
currNam->setProxyFactory( newProxyFactory );
|
currNam->setProxyFactory( newProxyFactory );
|
||||||
//FIXME: on Mac/Win as liblastfm's network access manager also sets its overriding application proxy
|
//FIXME: on Mac/Win as liblastfm's network access manager also sets its overriding application proxy
|
||||||
//may have to do a QNetworkProxy::setApplicationProxy and clobber our own factory to override it
|
//may have to do a QNetworkProxy::setApplicationProxy and clobber our own factory to override it
|
||||||
|
|
||||||
m_nam = QWeakPointer< QNetworkAccessManager >( currNam );
|
|
||||||
|
|
||||||
settingsChanged(); // to get the scrobbler set up
|
settingsChanged(); // to get the scrobbler set up
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -309,7 +306,7 @@ LastFmPlugin::notInCacheSlot( const QHash<QString, QString> criteria, const QStr
|
|||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
if ( m_nam.isNull() )
|
if ( !lastfm::nam() )
|
||||||
{
|
{
|
||||||
qDebug() << "Have a null QNAM, uh oh";
|
qDebug() << "Have a null QNAM, uh oh";
|
||||||
emit info( caller, type, input, QVariant(), customData );
|
emit info( caller, type, input, QVariant(), customData );
|
||||||
@@ -325,7 +322,7 @@ LastFmPlugin::notInCacheSlot( const QHash<QString, QString> criteria, const QStr
|
|||||||
|
|
||||||
QString imgurl = "http://ws.audioscrobbler.com/2.0/?method=album.imageredirect&artist=%1&album=%2&autocorrect=1&size=large&api_key=7a90f6672a04b809ee309af169f34b8b";
|
QString imgurl = "http://ws.audioscrobbler.com/2.0/?method=album.imageredirect&artist=%1&album=%2&autocorrect=1&size=large&api_key=7a90f6672a04b809ee309af169f34b8b";
|
||||||
QNetworkRequest req( imgurl.arg( artistName ).arg( albumName ) );
|
QNetworkRequest req( imgurl.arg( artistName ).arg( albumName ) );
|
||||||
QNetworkReply* reply = m_nam.data()->get( req );
|
QNetworkReply* reply = lastfm::nam()->get( req );
|
||||||
reply->setProperty( "customData", QVariant::fromValue<Tomahawk::InfoSystem::InfoCustomData>( customData ) );
|
reply->setProperty( "customData", QVariant::fromValue<Tomahawk::InfoSystem::InfoCustomData>( customData ) );
|
||||||
reply->setProperty( "origData", input );
|
reply->setProperty( "origData", input );
|
||||||
reply->setProperty( "caller", caller );
|
reply->setProperty( "caller", caller );
|
||||||
@@ -341,7 +338,7 @@ LastFmPlugin::notInCacheSlot( const QHash<QString, QString> criteria, const QStr
|
|||||||
|
|
||||||
QString imgurl = "http://ws.audioscrobbler.com/2.0/?method=artist.imageredirect&artist=%1&autocorrect=1&size=medium&api_key=7a90f6672a04b809ee309af169f34b8b";
|
QString imgurl = "http://ws.audioscrobbler.com/2.0/?method=artist.imageredirect&artist=%1&autocorrect=1&size=medium&api_key=7a90f6672a04b809ee309af169f34b8b";
|
||||||
QNetworkRequest req( imgurl.arg( artistName ) );
|
QNetworkRequest req( imgurl.arg( artistName ) );
|
||||||
QNetworkReply* reply = m_nam.data()->get( req );
|
QNetworkReply* reply = lastfm::nam()->get( req );
|
||||||
reply->setProperty( "customData", QVariant::fromValue<Tomahawk::InfoSystem::InfoCustomData>( customData ) );
|
reply->setProperty( "customData", QVariant::fromValue<Tomahawk::InfoSystem::InfoCustomData>( customData ) );
|
||||||
reply->setProperty( "origData", input );
|
reply->setProperty( "origData", input );
|
||||||
reply->setProperty( "caller", caller );
|
reply->setProperty( "caller", caller );
|
||||||
@@ -406,7 +403,7 @@ LastFmPlugin::coverArtReturned()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( m_nam.isNull() )
|
if ( !lastfm::nam() )
|
||||||
{
|
{
|
||||||
qDebug() << "Uh oh, nam is null";
|
qDebug() << "Uh oh, nam is null";
|
||||||
InfoType type = (Tomahawk::InfoSystem::InfoType)(reply->property( "type" ).toUInt());
|
InfoType type = (Tomahawk::InfoSystem::InfoType)(reply->property( "type" ).toUInt());
|
||||||
@@ -416,7 +413,7 @@ LastFmPlugin::coverArtReturned()
|
|||||||
}
|
}
|
||||||
// Follow HTTP redirect
|
// Follow HTTP redirect
|
||||||
QNetworkRequest req( redir );
|
QNetworkRequest req( redir );
|
||||||
QNetworkReply* newReply = m_nam.data()->get( req );
|
QNetworkReply* newReply = lastfm::nam()->get( req );
|
||||||
newReply->setProperty( "origData", reply->property( "origData" ) );
|
newReply->setProperty( "origData", reply->property( "origData" ) );
|
||||||
newReply->setProperty( "customData", reply->property( "customData" ) );
|
newReply->setProperty( "customData", reply->property( "customData" ) );
|
||||||
newReply->setProperty( "caller", reply->property( "caller" ) );
|
newReply->setProperty( "caller", reply->property( "caller" ) );
|
||||||
@@ -465,7 +462,7 @@ LastFmPlugin::artistImagesReturned()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( m_nam.isNull() )
|
if ( !lastfm::nam() )
|
||||||
{
|
{
|
||||||
qDebug() << "Uh oh, nam is null";
|
qDebug() << "Uh oh, nam is null";
|
||||||
InfoType type = (Tomahawk::InfoSystem::InfoType)(reply->property( "type" ).toUInt());
|
InfoType type = (Tomahawk::InfoSystem::InfoType)(reply->property( "type" ).toUInt());
|
||||||
@@ -475,7 +472,7 @@ LastFmPlugin::artistImagesReturned()
|
|||||||
}
|
}
|
||||||
// Follow HTTP redirect
|
// Follow HTTP redirect
|
||||||
QNetworkRequest req( redir );
|
QNetworkRequest req( redir );
|
||||||
QNetworkReply* newReply = m_nam.data()->get( req );
|
QNetworkReply* newReply = lastfm::nam()->get( req );
|
||||||
newReply->setProperty( "origData", reply->property( "origData" ) );
|
newReply->setProperty( "origData", reply->property( "origData" ) );
|
||||||
newReply->setProperty( "customData", reply->property( "customData" ) );
|
newReply->setProperty( "customData", reply->property( "customData" ) );
|
||||||
newReply->setProperty( "caller", reply->property( "caller" ) );
|
newReply->setProperty( "caller", reply->property( "caller" ) );
|
||||||
|
@@ -74,8 +74,6 @@ private:
|
|||||||
QString m_pw;
|
QString m_pw;
|
||||||
|
|
||||||
QList< QUrl > m_badUrls;
|
QList< QUrl > m_badUrls;
|
||||||
|
|
||||||
QWeakPointer< QNetworkAccessManager > m_nam;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -127,7 +127,7 @@ InfoSystem::getInfo( const QString &caller, const InfoType type, const QVariant&
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
InfoSystem::getInfo( const QString &caller, const InfoMap &input, InfoCustomData customData )
|
InfoSystem::getInfo( const QString &caller, const InfoTypeMap &input, InfoCustomData customData )
|
||||||
{
|
{
|
||||||
Q_FOREACH( InfoType type, input.keys() )
|
Q_FOREACH( InfoType type, input.keys() )
|
||||||
getInfo( caller, type, input[type], customData );
|
getInfo( caller, type, input[type], customData );
|
||||||
@@ -144,7 +144,7 @@ InfoSystem::pushInfo( const QString &caller, const InfoType type, const QVariant
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
InfoSystem::pushInfo( const QString &caller, const InfoMap &input )
|
InfoSystem::pushInfo( const QString &caller, const InfoTypeMap &input )
|
||||||
{
|
{
|
||||||
Q_FOREACH( InfoType type, input.keys() )
|
Q_FOREACH( InfoType type, input.keys() )
|
||||||
pushInfo( caller, type, input[type] );
|
pushInfo( caller, type, input[type] );
|
||||||
|
@@ -107,7 +107,7 @@ enum InfoType { // as items are saved in cache, mark them here to not change the
|
|||||||
InfoNotifyUser = 55
|
InfoNotifyUser = 55
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef QMap< InfoType, QVariant > InfoMap;
|
typedef QMap< InfoType, QVariant > InfoTypeMap;
|
||||||
typedef QMap< QString, QMap< QString, QString > > InfoGenericMap;
|
typedef QMap< QString, QMap< QString, QString > > InfoGenericMap;
|
||||||
typedef QHash< QString, QVariant > InfoCustomData;
|
typedef QHash< QString, QVariant > InfoCustomData;
|
||||||
typedef QHash< QString, QString > InfoCriteriaHash;
|
typedef QHash< QString, QString > InfoCriteriaHash;
|
||||||
@@ -159,9 +159,9 @@ public:
|
|||||||
~InfoSystem();
|
~InfoSystem();
|
||||||
|
|
||||||
void getInfo( const QString &caller, const InfoType type, const QVariant &input, InfoCustomData customData );
|
void getInfo( const QString &caller, const InfoType type, const QVariant &input, InfoCustomData customData );
|
||||||
void getInfo( const QString &caller, const InfoMap &input, InfoCustomData customData );
|
void getInfo( const QString &caller, const InfoTypeMap &input, InfoCustomData customData );
|
||||||
void pushInfo( const QString &caller, const InfoType type, const QVariant &input );
|
void pushInfo( const QString &caller, const InfoType type, const QVariant &input );
|
||||||
void pushInfo( const QString &caller, const InfoMap &input );
|
void pushInfo( const QString &caller, const InfoTypeMap &input );
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void info( QString caller, Tomahawk::InfoSystem::InfoType, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomData customData );
|
void info( QString caller, Tomahawk::InfoSystem::InfoType, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomData customData );
|
||||||
|
@@ -201,7 +201,7 @@ void XMPPBot::handleMessage(const Message& msg, MessageSession* session)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
InfoMap infoMap;
|
InfoTypeMap infoMap;
|
||||||
Q_FOREACH(QString token, tokens)
|
Q_FOREACH(QString token, tokens)
|
||||||
{
|
{
|
||||||
if (token == "biography")
|
if (token == "biography")
|
||||||
|
@@ -87,7 +87,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
QWeakPointer<XMPPBotClient> m_client;
|
QWeakPointer<XMPPBotClient> m_client;
|
||||||
Tomahawk::result_ptr m_currTrack;
|
Tomahawk::result_ptr m_currTrack;
|
||||||
Tomahawk::InfoSystem::InfoMap m_currInfoMap;
|
Tomahawk::InfoSystem::InfoTypeMap m_currInfoMap;
|
||||||
QString m_currReturnMessage;
|
QString m_currReturnMessage;
|
||||||
QString m_currReturnJid;
|
QString m_currReturnJid;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user