refactor: optimize imports
This commit is contained in:
parent
25e63c2aae
commit
ea076dcf72
7 changed files with 39 additions and 14 deletions
|
@ -1,6 +1,7 @@
|
|||
use std::path::PathBuf;
|
||||
use std::process::{Child, Command};
|
||||
use crate::configuration::{Config, ConfigFFmpeg};
|
||||
|
||||
use crate::configuration::ConfigFFmpeg;
|
||||
use crate::error;
|
||||
|
||||
pub struct TranscodeJob {
|
||||
pub input: String,
|
||||
|
@ -26,8 +27,11 @@ impl TranscodeJob {
|
|||
std::path::Path::new(&self.output).exists()
|
||||
}
|
||||
|
||||
pub fn run(&self, ffmpeg_config: &ConfigFFmpeg) -> Result<Child, std::io::Error> {
|
||||
pub fn run(&self, ffmpeg_config: &ConfigFFmpeg) -> Result<Child, error::Error> {
|
||||
let mut command = self.build_command(ffmpeg_config);
|
||||
command.spawn()
|
||||
match command.spawn() {
|
||||
Ok(child) => Ok(child),
|
||||
Err(e) => Err(error::Error::JobError(e))
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue