Added some fixes for Windows (now the setup command works)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user