Added some fixes for Windows (now the setup command works)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2022-10-24 23:42:45 -04:00
parent 004c057a2c
commit 9929db6c5b
4 changed files with 48 additions and 14 deletions

View File

@ -2,13 +2,19 @@ use config::Config;
use crate::settings;
use crate::transcoder::repository::Repository;
pub fn setup_command(repository_dir: &str) {
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 config and repository objects
let c: Config = settings::load_config();
let r: Repository = Repository::new(&shellexpand::tilde(&c.get_string("transcoder.repository").unwrap()));
// create and initialize our repository object
let r: Repository = Repository::new(repository_dir);
// initialize the video repository
r.initialize();
}