disc adoption

This commit is contained in:
2026-08-24 17:35:33 -04:00
parent 6b45477a9d
commit 6cf0820a1f
2 changed files with 6 additions and 2 deletions

View File

@@ -15,7 +15,6 @@ use crate::{coverartarchive::fetch_cover_art, import, musicbrainz::get_disc_info
pub fn adopt(timbre_dir: &Path) { pub fn adopt(timbre_dir: &Path) {
let disc = get_disc_info("http://catgpt-server:5000"); let disc = get_disc_info("http://catgpt-server:5000");
let release = &disc.releases[0]; let release = &disc.releases[0];
println!("{}", release.id);
let tmp_dir = timbre_dir.join(format!( let tmp_dir = timbre_dir.join(format!(
".tmp/{}", ".tmp/{}",
SystemTime::now() SystemTime::now()

View File

@@ -6,7 +6,7 @@ mod musicbrainz;
mod tagging; mod tagging;
use clap::{ use clap::{
Parser, Subcommand, Command, Parser, Subcommand,
builder::styling::{AnsiColor, Effects, Styles}, builder::styling::{AnsiColor, Effects, Styles},
}; };
use sha2::{Digest, Sha256}; use sha2::{Digest, Sha256};
@@ -69,6 +69,8 @@ enum Commands {
Repair, Repair,
/// import music files /// import music files
Import, Import,
/// Adopt a CD, import it into your library, also getting metadata
Adopt,
} }
fn is_audio(path: &Path) -> bool { fn is_audio(path: &Path) -> bool {
@@ -259,5 +261,8 @@ fn main() {
); );
} }
} }
Commands::Adopt => {
adopt::adopt(&timbre_dir);
}
} }
} }