about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--crates/yt/src/commands/implm.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/crates/yt/src/commands/implm.rs b/crates/yt/src/commands/implm.rs
new file mode 100644
index 0000000..238ef28
--- /dev/null
+++ b/crates/yt/src/commands/implm.rs
@@ -0,0 +1,25 @@
+use std::sync::Arc;
+
+use crate::commands::Command;
+
+use anyhow::Result;
+
+impl Command {
+    pub(crate) async fn implm(self, app: crate::app::App) -> Result<()> {
+        match self {
+            Command::Config { cmd } => cmd.implm(&app)?,
+            Command::Database { cmd } => cmd.implm(&app).await?,
+            Command::Download { cmd } => cmd.implm(Arc::new(app)).await?,
+            Command::Playlist { cmd } => cmd.implm(&app).await?,
+            Command::Select { cmd } => { cmd.unwrap_or_default().implm(&app).await?; }
+            Command::Show { cmd } => cmd.implm(&app).await?,
+            Command::Status { cmd } => cmd.implm(&app).await?,
+            Command::Subscriptions { cmd } => cmd.implm(&app).await?,
+            Command::Update { cmd } => cmd.implm(&app).await?,
+            Command::Videos { cmd } => cmd.implm(&app).await?,
+            Command::Watch { cmd } => cmd.implm(Arc::new(app)).await?,
+        }
+
+        Ok(())
+    }
+}