diff --git a/Persephone/MPDClient/Models/MPDSong.swift b/Persephone/MPDClient/Models/MPDSong.swift index 3a7c93b..d55d8b8 100644 --- a/Persephone/MPDClient/Models/MPDSong.swift +++ b/Persephone/MPDClient/Models/MPDSong.swift @@ -52,10 +52,18 @@ extension MPDClient { var album: MPDAlbum { return MPDAlbum( title: getTag(.album), - artist: getTag(.albumArtist) + artist: artist ) } + var artist: String { + if getTag(.albumArtist) != "" { + return getTag(.albumArtist) + } else { + return getTag(.artist) + } + } + func getTag(_ tagType: TagType) -> String { let mpdTagType = mpd_tag_type(rawValue: Int32(tagType.rawValue))