disc adoption
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user