Compare commits
No commits in common. "9cccb7af898d773201b071a201a3066309c58f65" and "61dd0f22a9efe1ccef1370bf7f91cb753c607bab" have entirely different histories.
9cccb7af89
...
61dd0f22a9
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
/target
|
/target
|
||||||
Cargo.lock
|
cargo.lock
|
||||||
|
@ -7,7 +7,7 @@ pub fn inv() -> Result<(), Box<dyn Error>> {
|
|||||||
let client = Client::new(String::from("https://invidious.projectsegfau.lt"));
|
let client = Client::new(String::from("https://invidious.projectsegfau.lt"));
|
||||||
let search_results = client.search(Some("q=rust programming"))?.items;
|
let search_results = client.search(Some("q=rust programming"))?.items;
|
||||||
let video = client.video("5C_HPTJg5ek", None)?;
|
let video = client.video("5C_HPTJg5ek", None)?;
|
||||||
//println!("{:?}", video);
|
println!("{:?}", video.title);
|
||||||
println!("{:?}", video.format_streams[2].url);
|
println!("{:?}", video.views);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
11
src/main.rs
11
src/main.rs
@ -18,15 +18,14 @@ fn main() {
|
|||||||
|
|
||||||
// Connect to "activate" signal of `app`
|
// Connect to "activate" signal of `app`
|
||||||
app.connect_activate(build_ui);
|
app.connect_activate(build_ui);
|
||||||
|
|
||||||
|
|
||||||
//print!("{:?}", output);
|
let output = inv::inv();
|
||||||
|
|
||||||
|
print!("{:?}", output);
|
||||||
// Run the application
|
// Run the application
|
||||||
app.run();
|
app.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fn build_ui(app: &Application) {
|
fn build_ui(app: &Application) {
|
||||||
// Create a button
|
// Create a button
|
||||||
let button = Button::builder()
|
let button = Button::builder()
|
||||||
@ -42,12 +41,8 @@ fn build_ui(app: &Application) {
|
|||||||
|
|
||||||
//button.connect_clicked(move |_| trig_play());
|
//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
|
// Set a listBox
|
||||||
let listbox = ListBox::builder()
|
let listbox = ListBox::builder()
|
||||||
|
Loading…
Reference in New Issue
Block a user