aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/cli.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cli.rs b/src/cli.rs
index bd81983..e0cea63 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -14,9 +14,9 @@ pub struct Cli {
14#[derive(Subcommand)] 14#[derive(Subcommand)]
15pub enum Commands { 15pub enum Commands {
16 /// Start the daemon 16 /// Start the daemon
17 Start, 17 StartDaemon,
18 /// Stop the daemon 18 /// Stop the daemon
19 Stop, 19 StopDaemon,
20 /// Restart the daemon (kill existing and start new) 20 /// Restart the daemon (kill existing and start new)
21 Restart, 21 Restart,
22 /// Play a track, album, or artist 22 /// Play a track, album, or artist
@@ -37,7 +37,7 @@ pub enum Commands {
37 /// Toggle play/pause 37 /// Toggle play/pause
38 Toggle, 38 Toggle,
39 /// Stop playback 39 /// Stop playback
40 StopPlayback, 40 Stop,
41 /// Skip to next track 41 /// Skip to next track
42 Next, 42 Next,
43 /// Skip to previous track 43 /// Skip to previous track
@@ -101,10 +101,10 @@ pub enum SettingsCommands {
101impl Cli { 101impl Cli {
102 pub fn run(&self) -> Result<(), Box<dyn std::error::Error>> { 102 pub fn run(&self) -> Result<(), Box<dyn std::error::Error>> {
103 match &self.command { 103 match &self.command {
104 Commands::Start => { 104 Commands::StartDaemon => {
105 crate::daemon::start_daemon()?; 105 crate::daemon::start_daemon()?;
106 } 106 }
107 Commands::Stop => { 107 Commands::StopDaemon => {
108 crate::daemon::stop_daemon()?; 108 crate::daemon::stop_daemon()?;
109 } 109 }
110 Commands::Restart => { 110 Commands::Restart => {
@@ -135,7 +135,7 @@ impl Cli {
135 Commands::Toggle => { 135 Commands::Toggle => {
136 crate::daemon::send_command("toggle".to_string())?; 136 crate::daemon::send_command("toggle".to_string())?;
137 } 137 }
138 Commands::StopPlayback => { 138 Commands::Stop => {
139 crate::daemon::send_command("stop".to_string())?; 139 crate::daemon::send_command("stop".to_string())?;
140 } 140 }
141 Commands::Next => { 141 Commands::Next => {