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

Few more tweaks

This commit is contained in:
Daniel Barber 2019-02-08 13:33:50 -05:00
parent 78e732cb7b
commit 669e24c3f6
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
4 changed files with 5 additions and 8 deletions

View File

@ -11,7 +11,7 @@ import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
static let mpdClient = MPDClient(
withDelegate: NotificationsController() as MPDClientDelegate
withDelegate: NotificationsController()
)
func applicationDidFinishLaunching(_ aNotification: Notification) {

View File

@ -134,7 +134,7 @@ class QueueViewController: NSViewController, NSOutlineViewDataSource, NSOutlineV
if index > 0 {
return SongItem(song: queue[index - 1], queuePos: index - 1)
} else {
return ""
return false
}
}

View File

@ -10,10 +10,7 @@ import Cocoa
class WindowController: NSWindowController {
enum TransportAction: Int {
case prevTrack = 0
case playPause = 1
case stop = 2
case nextTrack = 3
case prevTrack, playPause, stop, nextTrack
}
let playIcon = NSImage(named: NSImage.Name("playButton"))

View File

@ -16,7 +16,7 @@ extension MPDClient {
enum TagType: Int {
case unknown = -1
case artist, album, albumArtist, title, track, name,
genre, date, composer, performer, comment, disc
genre, date, composer, performer, comment, disc
case musicBrainzArtistId
case musicBrainzAlbumId
@ -43,7 +43,7 @@ extension MPDClient {
func getTag(_ tagType: TagType) -> String {
let mpdTagType = mpd_tag_type(rawValue: Int32(tagType.rawValue))
guard let tag = mpd_song_get_tag(mpdSong, mpdTagType, 0)
else { return "" }