From b0580265caf9401d364b7a2a6f8f337a93bc3e33 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sun, 29 Sep 2019 13:31:46 +0200 Subject: [PATCH] Listenbrainz: don't send "various artists" as album artist Fixes #273 --- src/scrobbler/listenbrainzscrobbler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/scrobbler/listenbrainzscrobbler.cpp b/src/scrobbler/listenbrainzscrobbler.cpp index 676c59e8d..e54724691 100644 --- a/src/scrobbler/listenbrainzscrobbler.cpp +++ b/src/scrobbler/listenbrainzscrobbler.cpp @@ -345,7 +345,12 @@ void ListenBrainzScrobbler::UpdateNowPlaying(const Song &song) { album = album.remove(Song::kAlbumRemoveMisc); QJsonObject object_track_metadata; - object_track_metadata.insert("artist_name", QJsonValue::fromVariant(song.effective_albumartist())); + if (song.albumartist().isEmpty() || song.albumartist().toLower() == "various artists") { + object_track_metadata.insert("artist_name", QJsonValue::fromVariant(song.artist())); + } + else { + object_track_metadata.insert("artist_name", QJsonValue::fromVariant(song.albumartist())); + } object_track_metadata.insert("release_name", QJsonValue::fromVariant(album)); object_track_metadata.insert("track_name", QJsonValue::fromVariant(song.title()));