1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-13 01:24:11 +02:00

* Set m_coverLoaded to true before emitting the coverChanged signal.

This commit is contained in:
Christian Muehlhaeuser
2012-07-01 02:51:10 +02:00
parent da07361ec0
commit 355c95e068
2 changed files with 8 additions and 8 deletions

View File

@@ -176,6 +176,8 @@ Album::infoSystemInfo( const Tomahawk::InfoSystem::InfoRequestData& requestData,
if ( !output.isNull() && output.isValid() ) if ( !output.isNull() && output.isValid() )
{ {
m_coverLoaded = true;
QVariantMap returnedData = output.value< QVariantMap >(); QVariantMap returnedData = output.value< QVariantMap >();
const QByteArray ba = returnedData["imgbytes"].toByteArray(); const QByteArray ba = returnedData["imgbytes"].toByteArray();
if ( ba.length() ) if ( ba.length() )
@@ -183,8 +185,6 @@ Album::infoSystemInfo( const Tomahawk::InfoSystem::InfoRequestData& requestData,
m_coverBuffer = ba; m_coverBuffer = ba;
emit coverChanged(); emit coverChanged();
} }
m_coverLoaded = true;
} }
} }
@@ -237,6 +237,6 @@ Album::infoid() const
{ {
if ( m_uuid.isEmpty() ) if ( m_uuid.isEmpty() )
m_uuid = uuid(); m_uuid = uuid();
return m_uuid; return m_uuid;
} }

View File

@@ -317,14 +317,14 @@ Artist::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVari
{ {
if ( !output.isNull() && output.isValid() ) if ( !output.isNull() && output.isValid() )
{ {
m_coverLoaded = true;
const QByteArray ba = returnedData["imgbytes"].toByteArray(); const QByteArray ba = returnedData["imgbytes"].toByteArray();
if ( ba.length() ) if ( ba.length() )
{ {
m_coverBuffer = ba; m_coverBuffer = ba;
emit coverChanged(); emit coverChanged();
} }
m_coverLoaded = true;
} }
break; break;
@@ -353,7 +353,7 @@ Artist::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVari
if ( source == "last.fm" ) if ( source == "last.fm" )
m_biography = bmap[ source ].toHash()[ "text" ].toString(); m_biography = bmap[ source ].toHash()[ "text" ].toString();
} }
m_biographyLoaded = true; m_biographyLoaded = true;
emit biographyLoaded(); emit biographyLoaded();
@@ -459,7 +459,7 @@ Artist::playlistInterface( ModelMode mode, const Tomahawk::collection_ptr& colle
pli = Tomahawk::playlistinterface_ptr( new Tomahawk::ArtistPlaylistInterface( this, mode, collection ) ); pli = Tomahawk::playlistinterface_ptr( new Tomahawk::ArtistPlaylistInterface( this, mode, collection ) );
connect( pli.data(), SIGNAL( tracksLoaded( Tomahawk::ModelMode, Tomahawk::collection_ptr ) ), connect( pli.data(), SIGNAL( tracksLoaded( Tomahawk::ModelMode, Tomahawk::collection_ptr ) ),
SLOT( onTracksLoaded( Tomahawk::ModelMode, Tomahawk::collection_ptr ) ) ); SLOT( onTracksLoaded( Tomahawk::ModelMode, Tomahawk::collection_ptr ) ) );
m_playlistInterface[ mode ][ collection ] = pli; m_playlistInterface[ mode ][ collection ] = pli;
} }
@@ -479,6 +479,6 @@ Artist::infoid() const
{ {
if ( m_uuid.isEmpty() ) if ( m_uuid.isEmpty() )
m_uuid = uuid(); m_uuid = uuid();
return m_uuid; return m_uuid;
} }