mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
* Use the OperationQueue's `operationCount` function instead of keeping count ourselves. This is reliable now each command is entirely self contained. * Rename `queueCommand` to `enqueueCommand` * Move the command Enum into its own model file * Move the `enqueueCommand` function into MPDClient+Command
33 lines
521 B
Swift
33 lines
521 B
Swift
//
|
|
// Command.swift
|
|
// Persephone
|
|
//
|
|
// Created by Daniel Barber on 2019/3/19.
|
|
// Copyright © 2019 Dan Barber. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
extension MPDClient {
|
|
enum Command {
|
|
// Transport commands
|
|
case prevTrack
|
|
case nextTrack
|
|
case playPause
|
|
case stop
|
|
case seekCurrentSong
|
|
|
|
// Status commands
|
|
case fetchStatus
|
|
|
|
// Queue commands
|
|
case fetchQueue
|
|
case playTrack
|
|
|
|
// Album commands
|
|
case fetchAllAlbums
|
|
case playAlbum
|
|
case getAlbumURI
|
|
}
|
|
}
|