mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
Few more tweaks
This commit is contained in:
parent
78e732cb7b
commit
669e24c3f6
@ -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) {
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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"))
|
||||
|
||||
@ -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 "" }
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user