1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-10 08:04:25 +02:00

Fix Adium plugin with updated notfications

This commit is contained in:
Jeff Mitchell
2012-04-09 13:11:35 -04:00
parent 80a1009aa2
commit bfdc7a3d67

View File

@@ -136,13 +136,16 @@ AdiumPlugin::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
void void
AdiumPlugin::audioStarted( const Tomahawk::InfoSystem::PushInfoPair pushInfoPair ) AdiumPlugin::audioStarted( const Tomahawk::InfoSystem::PushInfoPair pushInfoPair )
{ {
if ( !pushInfoPair.second.canConvert< Tomahawk::InfoSystem::InfoStringHash >() ) if ( !pushInfoPair.second.canConvert< QVariantMap >() )
return; return;
Tomahawk::InfoSystem::InfoStringHash hash = pushInfoPair.second.value< Tomahawk::InfoSystem::InfoStringHash >(); QVariantMap map = pushInfoPair.second.toMap();
qDebug() << Q_FUNC_INFO; if ( !map.contains( "trackinfo" ) || !map[ "trackinfo" ].canConvert< Tomahawk::InfoSystem::InfoStringHash >() )
return;
InfoStringHash hash = map[ "trackinfo" ].value< Tomahawk::InfoSystem::InfoStringHash >();
if ( !hash.contains( "title" ) || !hash.contains( "artist" ) ) if ( !hash.contains( "title" ) || !hash.contains( "artist" ) )
return; return;