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

Show album art on notification

This commit is contained in:
Daniel Barber 2019-04-14 19:40:35 -04:00
parent e441d7b0d6
commit 4094fc19ea
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -47,7 +47,6 @@ class QueueViewController: NSViewController,
else { return }
dataSource.setQueueIcon(state)
notifyTrack()
}
func notifyTrack() {
@ -59,6 +58,7 @@ class QueueViewController: NSViewController,
let notification = NSUserNotification()
notification.title = currentSong.title
notification.subtitle = "\(currentSong.artist)\(currentSong.album.title)"
notification.contentImage = queueAlbumArtImage.image
NSUserNotificationCenter.default.deliver(notification)
}
@ -91,6 +91,8 @@ class QueueViewController: NSViewController,
} else {
self.queueAlbumArtImage.image = NSImage.defaultCoverArt
}
self.notifyTrack()
}
.cauterize()
} else {