From 6cf0820a1f080e621c038863a021b73ba17aacd0 Mon Sep 17 00:00:00 2001 From: Toasterkitten Date: Mon, 24 Aug 2026 17:35:33 -0400 Subject: [PATCH] disc adoption --- src/adopt.rs | 1 - src/main.rs | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/adopt.rs b/src/adopt.rs index f5b0934..f964849 100644 --- a/src/adopt.rs +++ b/src/adopt.rs @@ -15,7 +15,6 @@ use crate::{coverartarchive::fetch_cover_art, import, musicbrainz::get_disc_info pub fn adopt(timbre_dir: &Path) { let disc = get_disc_info("http://catgpt-server:5000"); let release = &disc.releases[0]; - println!("{}", release.id); let tmp_dir = timbre_dir.join(format!( ".tmp/{}", SystemTime::now() diff --git a/src/main.rs b/src/main.rs index 6c6c3d9..f66b2dc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,7 @@ mod musicbrainz; mod tagging; use clap::{ - Parser, Subcommand, + Command, Parser, Subcommand, builder::styling::{AnsiColor, Effects, Styles}, }; use sha2::{Digest, Sha256}; @@ -69,6 +69,8 @@ enum Commands { Repair, /// import music files Import, + /// Adopt a CD, import it into your library, also getting metadata + Adopt, } fn is_audio(path: &Path) -> bool { @@ -259,5 +261,8 @@ fn main() { ); } } + Commands::Adopt => { + adopt::adopt(&timbre_dir); + } } }