Enable config file path for ssh connections

This commit is contained in:
Wojciech Kozlowski 2023-04-27 19:31:55 +02:00
parent 2ecc64437a
commit 52f5f90bac

View File

@ -62,7 +62,14 @@ fn main() {
if let Some(uri) = opt.beets_ssh_uri { if let Some(uri) = opt.beets_ssh_uri {
let uri = uri.into_string().expect("invalid SSH URI"); let uri = uri.into_string().expect("invalid SSH URI");
let lib_exec = BeetsLibrarySshExecutor::new(uri).expect("failed to initialise beets"); let beets_config_file_path = opt
.beets_config_file_path
.map(|s| s.into_string())
.transpose()
.expect("failed to extract beets config file path");
let lib_exec = BeetsLibrarySshExecutor::new(uri)
.expect("failed to initialise beets")
.config(beets_config_file_path);
let db_exec = JsonDatabaseFileBackend::new(&opt.database_file_path); let db_exec = JsonDatabaseFileBackend::new(&opt.database_file_path);
with(BeetsLibrary::new(lib_exec), JsonDatabase::new(db_exec)); with(BeetsLibrary::new(lib_exec), JsonDatabase::new(db_exec));
} else { } else {