21 lines
636 B
Rust
21 lines
636 B
Rust
use config::Config;
|
|
use crate::settings;
|
|
use crate::transcoder::repository::Repository;
|
|
|
|
pub fn setup_command() {
|
|
// load configuration
|
|
let c: Config = settings::load_config();
|
|
|
|
// resolve repository path
|
|
let repository_dir_raw: &str = &c.get_string("transcoder.repository").unwrap();
|
|
let repository_dir: &str = &shellexpand::tilde(repository_dir_raw);
|
|
|
|
// alert the user to what's happening
|
|
println!("Initializing video repository at {}...", repository_dir);
|
|
|
|
// create and initialize our repository object
|
|
let r: Repository = Repository::new(repository_dir);
|
|
// initialize the video repository
|
|
r.initialize();
|
|
}
|