1
1
mirror of https://github.com/danbee/persephone synced 2025-03-04 08:39:11 +00:00
persephone/Persephone/MPDClient/Models/MPDCommand.swift
Daniel Barber b581f297c9
Refactor connection logic
The app would crash when connection settings were changed. This
refactors the connection logic to be consistent with the rest of the
mpdclient command structure. This ultimately fixes the bug.
2020-01-20 13:35:59 -05:00

53 lines
897 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 MPDCommand {
case connect
case disconnect
// Transport commands
case prevTrack
case nextTrack
case playPause
case stop
case seekCurrentSong
case setShuffleState
case setRepeatState
// Database commands
case updateDatabase
// Status commands
case fetchStatus
// Queue commands
case fetchQueue
case playTrack
case clearQueue
case replaceQueue
case appendSong
case removeSong
case moveSongInQueue
case addSongToQueue
case addAlbumToQueue
// Artist commands
case fetchAllArtists
// Album commands
case fetchAlbums
case playAlbum
case getAlbumFirstSong
case getAlbumSongs
}
}