Figured out a ton of things now, Let's make an actual UI this time!

This commit is contained in:
Midou36O 2022-09-11 15:05:26 +01:00
parent 61dd0f22a9
commit 2858158277
Signed by: midou
GPG Key ID: 08063D5407090BC2
3 changed files with 1693 additions and 6 deletions

1682
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@ pub fn inv() -> Result<(), Box<dyn Error>> {
let client = Client::new(String::from("https://invidious.projectsegfau.lt"));
let search_results = client.search(Some("q=rust programming"))?.items;
let video = client.video("5C_HPTJg5ek", None)?;
println!("{:?}", video.title);
println!("{:?}", video.views);
//println!("{:?}", video);
println!("{:?}", video.format_streams[2].url);
Ok(())
}

View File

@ -18,14 +18,15 @@ fn main() {
// Connect to "activate" signal of `app`
app.connect_activate(build_ui);
let output = inv::inv();
print!("{:?}", output);
//print!("{:?}", output);
// Run the application
app.run();
}
fn build_ui(app: &Application) {
// Create a button
let button = Button::builder()
@ -41,8 +42,12 @@ fn build_ui(app: &Application) {
//button.connect_clicked(move |_| trig_play());
let video = Video::for_file(Some(&gio::File::for_path("/home/midou/Vidéos/miui.mp4")));
let video = Video::for_file(Some(&gio::File::for_path("/home/midou/Vidéos/miui.mp4")));
//let output = inv::inv();
//let video = Video::for_media_stream(Some(&output));
/*
// Set a listBox
let listbox = ListBox::builder()