diff --git a/src/libtomahawk/Query.cpp b/src/libtomahawk/Query.cpp index d1bdef934..c0eaac648 100644 --- a/src/libtomahawk/Query.cpp +++ b/src/libtomahawk/Query.cpp @@ -490,18 +490,18 @@ Query::checkResults() bool -Query::equals( const Tomahawk::query_ptr& other, bool ignoreCase ) const +Query::equals( const Tomahawk::query_ptr& other, bool ignoreCase, bool ignoreAlbum ) const { if ( other.isNull() ) return false; if ( ignoreCase ) return ( queryTrack()->artist().toLower() == other->queryTrack()->artist().toLower() && - queryTrack()->album().toLower() == other->queryTrack()->album().toLower() && + ( ignoreAlbum || queryTrack()->album().toLower() == other->queryTrack()->album().toLower() ) && queryTrack()->track().toLower() == other->queryTrack()->track().toLower() ); else return ( queryTrack()->artist() == other->queryTrack()->artist() && - queryTrack()->album() == other->queryTrack()->album() && + ( ignoreAlbum || queryTrack()->album() == other->queryTrack()->album() ) && queryTrack()->track() == other->queryTrack()->track() ); } diff --git a/src/libtomahawk/Query.h b/src/libtomahawk/Query.h index 7a65b9116..2a4e4f701 100644 --- a/src/libtomahawk/Query.h +++ b/src/libtomahawk/Query.h @@ -51,7 +51,7 @@ public: virtual ~Query(); - bool equals( const Tomahawk::query_ptr& other, bool ignoreCase = false ) const; + bool equals( const Tomahawk::query_ptr& other, bool ignoreCase = false, bool ignoreAlbum = false ) const; float howSimilar( const Tomahawk::result_ptr& r ); QVariant toVariant() const;