diff options
author | metamuffin <metamuffin@disroot.org> | 2025-04-30 10:47:54 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-04-30 10:47:54 +0200 |
commit | a2ef3f6ec4c830611fde1a2e935588ccbbc61c03 (patch) | |
tree | ddcc1cb501e6c7237edd491aa7136d02150d03d3 /tool/src/add.rs | |
parent | 212a0f23bc894faf88e159560c113f504349cc05 (diff) | |
download | jellything-a2ef3f6ec4c830611fde1a2e935588ccbbc61c03.tar jellything-a2ef3f6ec4c830611fde1a2e935588ccbbc61c03.tar.bz2 jellything-a2ef3f6ec4c830611fde1a2e935588ccbbc61c03.tar.zst |
config works
Diffstat (limited to 'tool/src/add.rs')
-rw-r--r-- | tool/src/add.rs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/tool/src/add.rs b/tool/src/add.rs index 2179a40..04328b2 100644 --- a/tool/src/add.rs +++ b/tool/src/add.rs @@ -4,11 +4,9 @@ Copyright (C) 2025 metamuffin <metamuffin.org> */ use crate::cli::Action; -use anyhow::anyhow; use dialoguer::{theme::ColorfulTheme, Confirm, FuzzySelect, Input}; -use jellybase::SECRETS; use jellycommon::TraktKind; -use jellyimport::trakt::Trakt; +use jellyimport::get_trakt; use log::warn; use std::{ fmt::Display, @@ -37,13 +35,7 @@ pub async fn add(action: Action) -> anyhow::Result<()> { .interact_text() .unwrap(); - let trakt = Trakt::new( - SECRETS - .api - .trakt - .as_ref() - .ok_or(anyhow!("no trakt api key configured"))?, - ); + let trakt = get_trakt()?; let results = trakt.search(search_kinds, &name).await?; |