From 02157078100bc9ccfa8250488193ea706512b0bc Mon Sep 17 00:00:00 2001 From: Jan Paul Erkelens Date: Wed, 8 Mar 2017 07:22:50 -0500 Subject: [PATCH] Uses effective fields for album hashing and comparison (#5653) --- src/core/song.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/song.cpp b/src/core/song.cpp index 735ecadc0..2d6bad30d 100644 --- a/src/core/song.cpp +++ b/src/core/song.cpp @@ -1127,12 +1127,13 @@ bool Song::IsOnSameAlbum(const Song& other) const { if (is_compilation() && album() == other.album()) return true; - return album() == other.album() && artist() == other.artist(); + return effective_album() == other.effective_album() && + effective_albumartist() == other.effective_albumartist(); } QString Song::AlbumKey() const { - return QString("%1|%2|%3").arg(is_compilation() ? "_compilation" : artist(), - has_cue() ? cue_path() : "", album()); + return QString("%1|%2|%3").arg(is_compilation() ? "_compilation" : effective_albumartist(), + has_cue() ? cue_path() : "", effective_album()); } void Song::ToXesam(QVariantMap* map) const {