main
Bel LaPointe 2023-12-27 21:54:54 -05:00
parent 49d811fc65
commit 01887f061a
2 changed files with 6 additions and 5 deletions

View File

@ -7,8 +7,8 @@ edition = "2021"
[dependencies]
dioxus = "0.4.3"
dioxus-web = "0.4.3"
rfd = "0.12.1"
lib = { path = "../src-lib" }
base64 = "0.21.5"
#dioxus-desktop = "0.4.3"
#dioxus-web = "0.4.3"
dioxus-desktop = "0.4.3"

View File

@ -31,7 +31,8 @@ fn App(cx: Scope) -> Element {
.pick_file()
.await {
Some(f) => {
file.set(f.file_name().clone()); // TODO swap to .path() on desktop
//file.set(f.file_name().clone()); // TODO swap to .path() on desktop
file.set(f.path().clone()); // TODO swap to .path() on desktop
},
None => { file.set(format!("<<failed to pick a file>>")); },
};
@ -72,8 +73,8 @@ struct Analyzed {
}
fn analyze(file: String) -> Vec<Analyzed> {
//let content_spans = lib::video::inspect(&file); // TODO
let content_spans: Result<Vec<lib::video::ContentSpan>, String> = Ok(vec![lib::video::ContentSpan{start: 0.5, stop: 20.2}]);
let content_spans = lib::video::inspect(&file); // TODO desktop
//let content_spans: Result<Vec<lib::video::ContentSpan>, String> = Ok(vec![lib::video::ContentSpan{start: 0.5, stop: 20.2}]);
if content_spans.is_err() {
return vec![Analyzed{
start: format!("<<err analyzing {}", file),