mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 21:57:41 +02:00
* Added coverLoaded() method to Query.
This commit is contained in:
@@ -780,7 +780,7 @@ Query::cover( const QSize& size, bool forceLoad ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_albumPtr->cover( size, forceLoad );
|
m_albumPtr->cover( size, forceLoad );
|
||||||
if ( m_albumPtr->infoLoaded() )
|
if ( m_albumPtr->coverLoaded() )
|
||||||
{
|
{
|
||||||
if ( !m_albumPtr->cover( size ).isNull() )
|
if ( !m_albumPtr->cover( size ).isNull() )
|
||||||
return m_albumPtr->cover( size );
|
return m_albumPtr->cover( size );
|
||||||
@@ -793,6 +793,19 @@ Query::cover( const QSize& size, bool forceLoad ) const
|
|||||||
#endif
|
#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>
|
QList<Tomahawk::query_ptr>
|
||||||
Query::similarTracks() const
|
Query::similarTracks() const
|
||||||
{
|
{
|
||||||
|
@@ -145,6 +145,7 @@ public:
|
|||||||
#ifndef ENABLE_HEADLESS
|
#ifndef ENABLE_HEADLESS
|
||||||
QPixmap cover( const QSize& size, bool forceLoad = true ) const;
|
QPixmap cover( const QSize& size, bool forceLoad = true ) const;
|
||||||
#endif
|
#endif
|
||||||
|
bool coverLoaded() const;
|
||||||
|
|
||||||
void setResolveFinished( bool resolved ) { m_resolveFinished = resolved; }
|
void setResolveFinished( bool resolved ) { m_resolveFinished = resolved; }
|
||||||
void setPlayedBy( const Tomahawk::source_ptr& source, unsigned int playtime );
|
void setPlayedBy( const Tomahawk::source_ptr& source, unsigned int playtime );
|
||||||
|
Reference in New Issue
Block a user