1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-23 09:19:41 +01:00

* Added coverLoaded() method to Query.

This commit is contained in:
Christian Muehlhaeuser 2012-05-27 17:34:03 +02:00
parent 9d064f7689
commit c5f6c25e93
2 changed files with 15 additions and 1 deletions

View File

@ -780,7 +780,7 @@ Query::cover( const QSize& size, bool forceLoad ) const
}
m_albumPtr->cover( size, forceLoad );
if ( m_albumPtr->infoLoaded() )
if ( m_albumPtr->coverLoaded() )
{
if ( !m_albumPtr->cover( size ).isNull() )
return m_albumPtr->cover( size );
@ -793,6 +793,19 @@ Query::cover( const QSize& size, bool forceLoad ) const
#endif
bool
Query::coverLoaded() const
{
if ( m_albumPtr.isNull() )
return false;
if ( m_albumPtr->coverLoaded() && !m_albumPtr->cover( QSize( 0, 0 ) ).isNull() )
return true;
return m_artistPtr->coverLoaded();
}
QList<Tomahawk::query_ptr>
Query::similarTracks() const
{

View File

@ -145,6 +145,7 @@ public:
#ifndef ENABLE_HEADLESS
QPixmap cover( const QSize& size, bool forceLoad = true ) const;
#endif
bool coverLoaded() const;
void setResolveFinished( bool resolved ) { m_resolveFinished = resolved; }
void setPlayedBy( const Tomahawk::source_ptr& source, unsigned int playtime );