From 373d7ff12bedb8e5aff104b61f9e8ace93506a46 Mon Sep 17 00:00:00 2001 From: emeric Date: Thu, 22 Feb 2018 13:59:43 +0100 Subject: [PATCH] When adding an artist to the playlist, add only the tracks he actually made (and not whole compilations for example) --- src/ui/Explore.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ui/Explore.cpp b/src/ui/Explore.cpp index d11df72a..fcd41278 100644 --- a/src/ui/Explore.cpp +++ b/src/ui/Explore.cpp @@ -138,7 +138,11 @@ static std::vector getArtistTracks(Wt::Dbo::Session& s for (auto release : releases) { auto tracks = release->getTracks(clusters); - res.insert( res.end(), tracks.begin(), tracks.end() ); + for (auto track : tracks) + { + if (track->getArtist() && track->getArtist().id() == artistId) + res.push_back(track); + } } return res;