diff --git a/src/audiocontrols.cpp b/src/audiocontrols.cpp index f2ed4c808..1cb79e41b 100644 --- a/src/audiocontrols.cpp +++ b/src/audiocontrols.cpp @@ -223,7 +223,7 @@ AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result ) requestData.type = Tomahawk::InfoSystem::InfoAlbumCoverArt; requestData.input = QVariant::fromValue< Tomahawk::InfoSystem::InfoCriteriaHash >( trackInfo ); requestData.customData = QVariantMap(); - + Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData ); } @@ -231,10 +231,11 @@ AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result ) void AudioControls::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output ) { - qDebug() << Q_FUNC_INFO << requestData.caller << requestData.type << s_acInfoIdentifier << Tomahawk::InfoSystem::InfoAlbumCoverArt; +// qDebug() << Q_FUNC_INFO << requestData.caller << requestData.type << s_acInfoIdentifier << Tomahawk::InfoSystem::InfoAlbumCoverArt; + if ( requestData.caller != s_acInfoIdentifier || requestData.type != Tomahawk::InfoSystem::InfoAlbumCoverArt ) { - qDebug() << "Info of wrong type or not with our identifier"; +// qDebug() << "Info of wrong type or not with our identifier"; return; } @@ -269,7 +270,7 @@ void AudioControls::infoSystemFinished( QString target ) { Q_UNUSED( target ); - qDebug() << Q_FUNC_INFO; +// qDebug() << Q_FUNC_INFO; } diff --git a/src/libtomahawk/audio/audioengine.cpp b/src/libtomahawk/audio/audioengine.cpp index 464bcd748..a6ec343b0 100644 --- a/src/libtomahawk/audio/audioengine.cpp +++ b/src/libtomahawk/audio/audioengine.cpp @@ -258,12 +258,12 @@ AudioEngine::sendNowPlayingNotification() connect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ), SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) ); - + connect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( finished( QString ) ), SLOT( infoSystemFinished( QString ) ) ); m_infoSystemConnected = true; } - + Tomahawk::InfoSystem::InfoCriteriaHash trackInfo; trackInfo["artist"] = m_currentTrack->album()->artist()->name(); trackInfo["album"] = m_currentTrack->album()->name(); @@ -273,7 +273,7 @@ AudioEngine::sendNowPlayingNotification() requestData.type = Tomahawk::InfoSystem::InfoAlbumCoverArt; requestData.input = QVariant::fromValue< Tomahawk::InfoSystem::InfoCriteriaHash >( trackInfo ); requestData.customData = QVariantMap(); - + Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData ); } @@ -281,12 +281,12 @@ AudioEngine::sendNowPlayingNotification() void AudioEngine::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output ) { - qDebug() << Q_FUNC_INFO; - +// qDebug() << Q_FUNC_INFO; + if ( requestData.caller != s_aeInfoIdentifier || requestData.type != Tomahawk::InfoSystem::InfoAlbumCoverArt ) { - qDebug() << Q_FUNC_INFO << " not destined for us or wrong type, caller is " << requestData.caller << " and type is " << requestData.type; +// qDebug() << Q_FUNC_INFO << " not destined for us or wrong type, caller is " << requestData.caller << " and type is " << requestData.type; return; } @@ -297,10 +297,10 @@ AudioEngine::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, .arg( m_currentTrack->album()->name() ); if ( !output.isNull() && output.isValid() ) { - qDebug() << Q_FUNC_INFO << " output is valid"; +// qDebug() << Q_FUNC_INFO << " output is valid"; QVariantMap returnedData = output.value< QVariantMap >(); const QByteArray ba = returnedData["imgbytes"].toByteArray(); - qDebug() << "ba.length = " << ba.length(); +// qDebug() << "ba.length = " << ba.length(); if ( ba.length() ) { QPixmap pm; @@ -308,7 +308,7 @@ AudioEngine::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, playInfo["image"] = QVariant( pm.toImage() ); } } - + Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo( s_aeInfoIdentifier, Tomahawk::InfoSystem::InfoNotifyUser, QVariant::fromValue< QVariantMap >( playInfo ) ); @@ -319,7 +319,7 @@ void AudioEngine::infoSystemFinished( QString caller ) { Q_UNUSED( caller ); - qDebug() << Q_FUNC_INFO; +// qDebug() << Q_FUNC_INFO; } @@ -398,7 +398,7 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result ) trackInfo["title"] = m_currentTrack->track(); trackInfo["artist"] = m_currentTrack->artist()->name(); trackInfo["album"] = m_currentTrack->album()->name(); - + if ( TomahawkSettings::instance()->verboseNotifications() ) sendNowPlayingNotification(); diff --git a/src/libtomahawk/playlist/albummodel.cpp b/src/libtomahawk/playlist/albummodel.cpp index 562834bf2..345c19d35 100644 --- a/src/libtomahawk/playlist/albummodel.cpp +++ b/src/libtomahawk/playlist/albummodel.cpp @@ -307,12 +307,12 @@ AlbumModel::onAlbumsAdded( const QList& albums ) void AlbumModel::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output ) { - qDebug() << Q_FUNC_INFO << " with caller " << requestData.caller; +// qDebug() << Q_FUNC_INFO << " with caller " << requestData.caller; if ( requestData.caller != s_tmInfoIdentifier || ( requestData.type != Tomahawk::InfoSystem::InfoAlbumCoverArt && requestData.type != Tomahawk::InfoSystem::InfoArtistImages ) ) { - qDebug() << "Info of wrong type or not with our identifier"; +// qDebug() << "Info of wrong type or not with our identifier"; return; } @@ -346,7 +346,7 @@ void AlbumModel::infoSystemFinished( QString target ) { Q_UNUSED( target ); - qDebug() << Q_FUNC_INFO; +// qDebug() << Q_FUNC_INFO; } diff --git a/src/libtomahawk/playlist/treemodel.cpp b/src/libtomahawk/playlist/treemodel.cpp index 1a7ef9e62..066c1a569 100644 --- a/src/libtomahawk/playlist/treemodel.cpp +++ b/src/libtomahawk/playlist/treemodel.cpp @@ -600,12 +600,12 @@ TreeModel::onTracksAdded( const QList& tracks, const QVaria void TreeModel::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output ) { - qDebug() << Q_FUNC_INFO; +// qDebug() << Q_FUNC_INFO; if ( requestData.caller != s_tmInfoIdentifier || ( requestData.type != Tomahawk::InfoSystem::InfoAlbumCoverArt && requestData.type != Tomahawk::InfoSystem::InfoArtistImages ) ) { - qDebug() << "Info of wrong type or not with our identifier"; +// qDebug() << "Info of wrong type or not with our identifier"; return; } @@ -618,7 +618,6 @@ TreeModel::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QV Tomahawk::InfoSystem::InfoCriteriaHash pptr = requestData.input.value< Tomahawk::InfoSystem::InfoCriteriaHash >(); QVariantMap returnedData = output.value< QVariantMap >(); const QByteArray ba = returnedData["imgbytes"].toByteArray(); - qDebug() << "ba.length = " << ba.length(); if ( ba.length() ) { QPixmap pm; @@ -639,7 +638,7 @@ void TreeModel::infoSystemFinished( QString target ) { Q_UNUSED( target ); - qDebug() << Q_FUNC_INFO; +// qDebug() << Q_FUNC_INFO; }