Compare commits
3 Commits
61dd0f22a9
...
9cccb7af89
Author | SHA1 | Date | |
---|---|---|---|
9cccb7af89 | |||
b77c0cf50c | |||
2858158277 |
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.title);
|
//println!("{:?}", video);
|
||||||
println!("{:?}", video.views);
|
println!("{:?}", video.format_streams[2].url);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -19,13 +19,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);
|
||||||
|
|
||||||
let output = inv::inv();
|
|
||||||
|
|
||||||
print!("{:?}", output);
|
//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()
|
||||||
@ -41,7 +42,11 @@ 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
|
||||||
|
Loading…
Reference in New Issue
Block a user