tauri aint what i want
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
pub mod video;
|
||||
use std::path::Path;
|
||||
|
||||
pub fn analyze(file: &str) -> String {
|
||||
match _analyze(file) {
|
||||
@@ -21,5 +22,9 @@ pub fn clipify(file: &str) -> String {
|
||||
|
||||
fn _clipify(file: &str) -> Result<String, String> {
|
||||
eprintln!("clipifying {}", file);
|
||||
Err(format!("not impl"))
|
||||
let files = video::clipify(&file.to_string())?;
|
||||
match files.iter().nth(0) {
|
||||
Some(file) => Ok(Path::new(file).parent().unwrap().to_str().unwrap().to_string()),
|
||||
None => Err(format!("no clips found from {}", file)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ impl Inspection {
|
||||
.filter(|x| (*x).contains("start: "))
|
||||
.filter(|x| (*x).contains("bitrate: "))
|
||||
.nth(0)
|
||||
.unwrap()
|
||||
.expect("did not find duration from ffmpeg")
|
||||
.split(",").nth(0).unwrap()
|
||||
.split(": ").nth(1).unwrap();
|
||||
let pieces: Vec<_> = ts.split(":")
|
||||
|
||||
Reference in New Issue
Block a user