aboutsummaryrefslogtreecommitdiff
path: root/tool/src/add.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-04-16 18:15:47 +0200
committermetamuffin <metamuffin@disroot.org>2024-04-16 18:15:47 +0200
commitddf52f02d66abfee17a4105503220a9a34064f29 (patch)
treebb01d20ef9daea32730b98af8b159e87eea15704 /tool/src/add.rs
parent783198703569dd1d1c17f2b3a40a62f20a6f8a44 (diff)
downloadjellything-ddf52f02d66abfee17a4105503220a9a34064f29.tar
jellything-ddf52f02d66abfee17a4105503220a9a34064f29.tar.bz2
jellything-ddf52f02d66abfee17a4105503220a9a34064f29.tar.zst
jellytool completion generator
Diffstat (limited to 'tool/src/add.rs')
-rw-r--r--tool/src/add.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/tool/src/add.rs b/tool/src/add.rs
index 23924cb..dfec40d 100644
--- a/tool/src/add.rs
+++ b/tool/src/add.rs
@@ -1,18 +1,17 @@
-use std::{
- fmt::Display,
- path::{Path, PathBuf},
-};
-
-use crate::Action;
+use crate::cli::Action;
use anyhow::{anyhow, bail, Context};
use dialoguer::{theme::ColorfulTheme, Confirm, FuzzySelect, Input, MultiSelect};
use jellybase::{CONF, SECRETS};
use jellycommon::{ImportOptions, ImportSource, TraktKind};
use jellyimport::trakt::Trakt;
use log::warn;
+use std::{
+ fmt::Display,
+ path::{Path, PathBuf},
+};
use tokio::{fs::File, io::AsyncWriteExt};
-pub(crate) async fn add(action: Action) -> anyhow::Result<()> {
+pub async fn add(action: Action) -> anyhow::Result<()> {
match action {
Action::Add {
id,