Figured out a ton of things now, Let's make an actual UI this time!
This commit is contained in:
parent
61dd0f22a9
commit
2858158277
1682
Cargo.lock
generated
Normal file
1682
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -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(())
|
||||
}
|
||||
|
13
src/main.rs
13
src/main.rs
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user