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
|
@NSApplicationMain
|
||||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||||
static let mpdClient = MPDClient(
|
static let mpdClient = MPDClient(
|
||||||
withDelegate: NotificationsController() as MPDClientDelegate
|
withDelegate: NotificationsController()
|
||||||
)
|
)
|
||||||
|
|
||||||
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
||||||
|
|||||||
@ -134,7 +134,7 @@ class QueueViewController: NSViewController, NSOutlineViewDataSource, NSOutlineV
|
|||||||
if index > 0 {
|
if index > 0 {
|
||||||
return SongItem(song: queue[index - 1], queuePos: index - 1)
|
return SongItem(song: queue[index - 1], queuePos: index - 1)
|
||||||
} else {
|
} else {
|
||||||
return ""
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,10 +10,7 @@ import Cocoa
|
|||||||
|
|
||||||
class WindowController: NSWindowController {
|
class WindowController: NSWindowController {
|
||||||
enum TransportAction: Int {
|
enum TransportAction: Int {
|
||||||
case prevTrack = 0
|
case prevTrack, playPause, stop, nextTrack
|
||||||
case playPause = 1
|
|
||||||
case stop = 2
|
|
||||||
case nextTrack = 3
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let playIcon = NSImage(named: NSImage.Name("playButton"))
|
let playIcon = NSImage(named: NSImage.Name("playButton"))
|
||||||
|
|||||||
@ -16,7 +16,7 @@ extension MPDClient {
|
|||||||
enum TagType: Int {
|
enum TagType: Int {
|
||||||
case unknown = -1
|
case unknown = -1
|
||||||
case artist, album, albumArtist, title, track, name,
|
case artist, album, albumArtist, title, track, name,
|
||||||
genre, date, composer, performer, comment, disc
|
genre, date, composer, performer, comment, disc
|
||||||
|
|
||||||
case musicBrainzArtistId
|
case musicBrainzArtistId
|
||||||
case musicBrainzAlbumId
|
case musicBrainzAlbumId
|
||||||
@ -43,7 +43,7 @@ extension MPDClient {
|
|||||||
|
|
||||||
func getTag(_ tagType: TagType) -> String {
|
func getTag(_ tagType: TagType) -> String {
|
||||||
let mpdTagType = mpd_tag_type(rawValue: Int32(tagType.rawValue))
|
let mpdTagType = mpd_tag_type(rawValue: Int32(tagType.rawValue))
|
||||||
|
|
||||||
guard let tag = mpd_song_get_tag(mpdSong, mpdTagType, 0)
|
guard let tag = mpd_song_get_tag(mpdSong, mpdTagType, 0)
|
||||||
else { return "" }
|
else { return "" }
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user