Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e2cf357f4 | ||
|
|
4aede62dbb | ||
|
|
c3d6cd1545 |
2
src/Cargo.lock
generated
2
src/Cargo.lock
generated
@@ -1351,7 +1351,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "home-video-blue-extractinator"
|
name = "home-video-blue-extractinator"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.21.5",
|
"base64 0.21.5",
|
||||||
"dioxus",
|
"dioxus",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "home-video-blue-extractinator"
|
name = "home-video-blue-extractinator"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
@@ -15,7 +15,7 @@ dioxus-desktop = "0.4.3"
|
|||||||
[package.metadata.bundle]
|
[package.metadata.bundle]
|
||||||
name = "home-video-blue-extractinator"
|
name = "home-video-blue-extractinator"
|
||||||
identifier = "com.breel.home-video-blue-extractinator"
|
identifier = "com.breel.home-video-blue-extractinator"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
copyright = "Copyright (c) breel.dev 2023. All rights reserved."
|
copyright = "Copyright (c) breel.dev 2023. All rights reserved."
|
||||||
long_description = """
|
long_description = """
|
||||||
Tool to turn long home movies into clips with less noise.
|
Tool to turn long home movies into clips with less noise.
|
||||||
|
|||||||
@@ -1,28 +1,16 @@
|
|||||||
#![allow(non_snake_case)]
|
#![allow(non_snake_case)]
|
||||||
// import the prelude to get access to the `rsx!` macro and the `Scope` and `Element` types
|
// import the prelude to get access to the `rsx!` macro and the `Scope` and `Element` types
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
use dioxus::hooks::use_future;
|
|
||||||
use lib;
|
use lib;
|
||||||
use base64::{engine::general_purpose, Engine as _};
|
use base64::{engine::general_purpose, Engine as _};
|
||||||
use core::cmp::Ordering;
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
dioxus_desktop::launch(App);
|
||||||
dioxus_desktop::launch_cfg(App, dioxus_desktop::Config::new()
|
dioxus_desktop::launch_cfg(App, dioxus_desktop::Config::new()
|
||||||
.with_window(dioxus_desktop::WindowBuilder::new()
|
.with_window(dioxus_desktop::WindowBuilder::new()
|
||||||
.with_title("home-video-blue-extractinator")
|
.with_title("home-video-blue-extractinator")
|
||||||
.with_menu({
|
));
|
||||||
let mut menu = dioxus_desktop::tao::menu::MenuBar::new();
|
|
||||||
|
|
||||||
let mut app_menu = dioxus_desktop::tao::menu::MenuBar::new();
|
|
||||||
app_menu.add_native_item(dioxus_desktop::tao::menu::MenuItem::Minimize);
|
|
||||||
app_menu.add_native_item(dioxus_desktop::tao::menu::MenuItem::Quit);
|
|
||||||
|
|
||||||
menu.add_submenu("&home-video-blue-extractinator", true, app_menu);
|
|
||||||
menu
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// define a component that renders a div with the text "Hello, world!"
|
// define a component that renders a div with the text "Hello, world!"
|
||||||
@@ -226,7 +214,7 @@ async fn analyze(file: String) -> Analysis {
|
|||||||
stop: content_span.stop.to_string(),
|
stop: content_span.stop.to_string(),
|
||||||
screenshot: match lib::video::screenshot_png(&file, ts) {
|
screenshot: match lib::video::screenshot_png(&file, ts) {
|
||||||
Ok(png) => general_purpose::STANDARD.encode(&png),
|
Ok(png) => general_purpose::STANDARD.encode(&png),
|
||||||
Err(_) => a_png.to_string(),
|
Err(_) => A_PNG.to_string(),
|
||||||
},
|
},
|
||||||
has_content: false,
|
has_content: false,
|
||||||
}
|
}
|
||||||
@@ -269,9 +257,9 @@ async fn clipify(file: String, content_spans: Vec<lib::video::ContentSpan>) -> S
|
|||||||
}
|
}
|
||||||
let _ = opener::open(d.clone());
|
let _ = opener::open(d.clone());
|
||||||
match statuses.len() {
|
match statuses.len() {
|
||||||
_ => statuses.join(", "),
|
|
||||||
0 => d,
|
0 => d,
|
||||||
|
_ => statuses.join(", "),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const a_png: &str = r"iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==";
|
const A_PNG: &str = r"iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==";
|
||||||
|
|||||||
Reference in New Issue
Block a user