1
1
mirror of https://github.com/danbee/persephone synced 2025-03-04 08:39:11 +00:00

Some songs don't have an AlbumArtist listed

This commit is contained in:
Daniel Barber 2019-04-01 08:54:20 -04:00
parent fc99c59d53
commit 5a8bc4a836
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

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