From 8e0f40c042099dc0090fe6acc1fba79bd52afab1 Mon Sep 17 00:00:00 2001 From: DaveTBlake Date: Tue, 15 Oct 2019 14:29:27 +0100 Subject: [PATCH] Fix Musicplayer.Property(Role.xxx) info labels --- xbmc/guilib/guiinfo/MusicGUIInfo.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xbmc/guilib/guiinfo/MusicGUIInfo.cpp b/xbmc/guilib/guiinfo/MusicGUIInfo.cpp index 121c5fb80300a..f29ba7ebf986e 100644 --- a/xbmc/guilib/guiinfo/MusicGUIInfo.cpp +++ b/xbmc/guilib/guiinfo/MusicGUIInfo.cpp @@ -326,6 +326,14 @@ bool CMusicGUIInfo::GetLabel(std::string& value, const CFileItem *item, int cont // MUSICPLAYER_* /////////////////////////////////////////////////////////////////////////////////////////////// case MUSICPLAYER_PROPERTY: + if (StringUtils::StartsWithNoCase(info.GetData3(), "Role.") && item->HasMusicInfoTag()) + { + // "Role.xxxx" properties are held in music tag + std::string property = info.GetData3(); + property.erase(0, 5); //Remove Role. + value = item->GetMusicInfoTag()->GetArtistStringForRole(property); + return true; + } value = item->GetProperty(info.GetData3()).asString(); return true; case MUSICPLAYER_PLAYLISTLEN: