1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-14 09:44:51 +01:00

Listenbrainz: don't send "various artists" as album artist

Fixes #273
This commit is contained in:
Jonas Kvinge 2019-09-29 13:31:46 +02:00
parent b4f012392a
commit b0580265ca

View File

@ -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()));