mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
* Removed some InfoSystem debug output.
This commit is contained in:
@@ -223,7 +223,7 @@ AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
|||||||
requestData.type = Tomahawk::InfoSystem::InfoAlbumCoverArt;
|
requestData.type = Tomahawk::InfoSystem::InfoAlbumCoverArt;
|
||||||
requestData.input = QVariant::fromValue< Tomahawk::InfoSystem::InfoCriteriaHash >( trackInfo );
|
requestData.input = QVariant::fromValue< Tomahawk::InfoSystem::InfoCriteriaHash >( trackInfo );
|
||||||
requestData.customData = QVariantMap();
|
requestData.customData = QVariantMap();
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData );
|
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,10 +231,11 @@ AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
|||||||
void
|
void
|
||||||
AudioControls::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output )
|
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 )
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,7 +270,7 @@ void
|
|||||||
AudioControls::infoSystemFinished( QString target )
|
AudioControls::infoSystemFinished( QString target )
|
||||||
{
|
{
|
||||||
Q_UNUSED( target );
|
Q_UNUSED( target );
|
||||||
qDebug() << Q_FUNC_INFO;
|
// qDebug() << Q_FUNC_INFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -258,12 +258,12 @@ AudioEngine::sendNowPlayingNotification()
|
|||||||
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
||||||
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
||||||
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
||||||
|
|
||||||
connect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( finished( QString ) ), SLOT( infoSystemFinished( QString ) ) );
|
connect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( finished( QString ) ), SLOT( infoSystemFinished( QString ) ) );
|
||||||
|
|
||||||
m_infoSystemConnected = true;
|
m_infoSystemConnected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoCriteriaHash trackInfo;
|
Tomahawk::InfoSystem::InfoCriteriaHash trackInfo;
|
||||||
trackInfo["artist"] = m_currentTrack->album()->artist()->name();
|
trackInfo["artist"] = m_currentTrack->album()->artist()->name();
|
||||||
trackInfo["album"] = m_currentTrack->album()->name();
|
trackInfo["album"] = m_currentTrack->album()->name();
|
||||||
@@ -273,7 +273,7 @@ AudioEngine::sendNowPlayingNotification()
|
|||||||
requestData.type = Tomahawk::InfoSystem::InfoAlbumCoverArt;
|
requestData.type = Tomahawk::InfoSystem::InfoAlbumCoverArt;
|
||||||
requestData.input = QVariant::fromValue< Tomahawk::InfoSystem::InfoCriteriaHash >( trackInfo );
|
requestData.input = QVariant::fromValue< Tomahawk::InfoSystem::InfoCriteriaHash >( trackInfo );
|
||||||
requestData.customData = QVariantMap();
|
requestData.customData = QVariantMap();
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData );
|
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,12 +281,12 @@ AudioEngine::sendNowPlayingNotification()
|
|||||||
void
|
void
|
||||||
AudioEngine::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output )
|
AudioEngine::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
// qDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
if ( requestData.caller != s_aeInfoIdentifier ||
|
if ( requestData.caller != s_aeInfoIdentifier ||
|
||||||
requestData.type != Tomahawk::InfoSystem::InfoAlbumCoverArt )
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,10 +297,10 @@ AudioEngine::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData,
|
|||||||
.arg( m_currentTrack->album()->name() );
|
.arg( m_currentTrack->album()->name() );
|
||||||
if ( !output.isNull() && output.isValid() )
|
if ( !output.isNull() && output.isValid() )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << " output is valid";
|
// qDebug() << Q_FUNC_INFO << " output is valid";
|
||||||
QVariantMap returnedData = output.value< QVariantMap >();
|
QVariantMap returnedData = output.value< QVariantMap >();
|
||||||
const QByteArray ba = returnedData["imgbytes"].toByteArray();
|
const QByteArray ba = returnedData["imgbytes"].toByteArray();
|
||||||
qDebug() << "ba.length = " << ba.length();
|
// qDebug() << "ba.length = " << ba.length();
|
||||||
if ( ba.length() )
|
if ( ba.length() )
|
||||||
{
|
{
|
||||||
QPixmap pm;
|
QPixmap pm;
|
||||||
@@ -308,7 +308,7 @@ AudioEngine::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData,
|
|||||||
playInfo["image"] = QVariant( pm.toImage() );
|
playInfo["image"] = QVariant( pm.toImage() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo(
|
Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo(
|
||||||
s_aeInfoIdentifier, Tomahawk::InfoSystem::InfoNotifyUser,
|
s_aeInfoIdentifier, Tomahawk::InfoSystem::InfoNotifyUser,
|
||||||
QVariant::fromValue< QVariantMap >( playInfo ) );
|
QVariant::fromValue< QVariantMap >( playInfo ) );
|
||||||
@@ -319,7 +319,7 @@ void
|
|||||||
AudioEngine::infoSystemFinished( QString caller )
|
AudioEngine::infoSystemFinished( QString caller )
|
||||||
{
|
{
|
||||||
Q_UNUSED( 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["title"] = m_currentTrack->track();
|
||||||
trackInfo["artist"] = m_currentTrack->artist()->name();
|
trackInfo["artist"] = m_currentTrack->artist()->name();
|
||||||
trackInfo["album"] = m_currentTrack->album()->name();
|
trackInfo["album"] = m_currentTrack->album()->name();
|
||||||
|
|
||||||
if ( TomahawkSettings::instance()->verboseNotifications() )
|
if ( TomahawkSettings::instance()->verboseNotifications() )
|
||||||
sendNowPlayingNotification();
|
sendNowPlayingNotification();
|
||||||
|
|
||||||
|
@@ -307,12 +307,12 @@ AlbumModel::onAlbumsAdded( const QList<Tomahawk::album_ptr>& albums )
|
|||||||
void
|
void
|
||||||
AlbumModel::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output )
|
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 ||
|
if ( requestData.caller != s_tmInfoIdentifier ||
|
||||||
( requestData.type != Tomahawk::InfoSystem::InfoAlbumCoverArt && requestData.type != Tomahawk::InfoSystem::InfoArtistImages ) )
|
( 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,7 +346,7 @@ void
|
|||||||
AlbumModel::infoSystemFinished( QString target )
|
AlbumModel::infoSystemFinished( QString target )
|
||||||
{
|
{
|
||||||
Q_UNUSED( target );
|
Q_UNUSED( target );
|
||||||
qDebug() << Q_FUNC_INFO;
|
// qDebug() << Q_FUNC_INFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -600,12 +600,12 @@ TreeModel::onTracksAdded( const QList<Tomahawk::query_ptr>& tracks, const QVaria
|
|||||||
void
|
void
|
||||||
TreeModel::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output )
|
TreeModel::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
// qDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
if ( requestData.caller != s_tmInfoIdentifier ||
|
if ( requestData.caller != s_tmInfoIdentifier ||
|
||||||
( requestData.type != Tomahawk::InfoSystem::InfoAlbumCoverArt && requestData.type != Tomahawk::InfoSystem::InfoArtistImages ) )
|
( 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -618,7 +618,6 @@ TreeModel::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QV
|
|||||||
Tomahawk::InfoSystem::InfoCriteriaHash pptr = requestData.input.value< Tomahawk::InfoSystem::InfoCriteriaHash >();
|
Tomahawk::InfoSystem::InfoCriteriaHash pptr = requestData.input.value< Tomahawk::InfoSystem::InfoCriteriaHash >();
|
||||||
QVariantMap returnedData = output.value< QVariantMap >();
|
QVariantMap returnedData = output.value< QVariantMap >();
|
||||||
const QByteArray ba = returnedData["imgbytes"].toByteArray();
|
const QByteArray ba = returnedData["imgbytes"].toByteArray();
|
||||||
qDebug() << "ba.length = " << ba.length();
|
|
||||||
if ( ba.length() )
|
if ( ba.length() )
|
||||||
{
|
{
|
||||||
QPixmap pm;
|
QPixmap pm;
|
||||||
@@ -639,7 +638,7 @@ void
|
|||||||
TreeModel::infoSystemFinished( QString target )
|
TreeModel::infoSystemFinished( QString target )
|
||||||
{
|
{
|
||||||
Q_UNUSED( target );
|
Q_UNUSED( target );
|
||||||
qDebug() << Q_FUNC_INFO;
|
// qDebug() << Q_FUNC_INFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user