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:
parent
fc99c59d53
commit
5a8bc4a836
@ -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))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user