2023-07-25 10:46:47 +01:00
|
|
|
use podal::prelude::*;
|
|
|
|
|
2023-07-28 18:35:41 +01:00
|
|
|
use podal::{feed::FeedEnv, fetch::FetchEnv, history::HistoryEnv};
|
|
|
|
|
2023-07-25 10:46:47 +01:00
|
|
|
fn main() -> Result<()> {
|
2023-07-23 18:50:59 +01:00
|
|
|
println!("Podal");
|
|
|
|
let subscriptions = "subscriptions.txt";
|
|
|
|
let history = "downloaded.txt";
|
2023-07-24 07:40:20 +01:00
|
|
|
let site = "https://www.youtube.com/";
|
2023-07-23 18:50:59 +01:00
|
|
|
|
2023-07-25 14:47:33 +01:00
|
|
|
podal::run(
|
|
|
|
subscriptions,
|
|
|
|
history,
|
|
|
|
site,
|
2023-07-28 18:35:41 +01:00
|
|
|
podal::Env {
|
|
|
|
feed: FeedEnv {
|
|
|
|
find: podal::feed::find,
|
|
|
|
get: podal::feed::reqwest_blocking_get,
|
|
|
|
},
|
|
|
|
|
|
|
|
history: HistoryEnv {
|
|
|
|
find: podal::history::find,
|
|
|
|
add: podal::history::add,
|
|
|
|
},
|
|
|
|
fetch: FetchEnv {
|
|
|
|
download: podal::fetch::download,
|
|
|
|
get: podal::fetch::get,
|
|
|
|
},
|
|
|
|
},
|
2023-07-25 14:47:33 +01:00
|
|
|
)?;
|
2023-07-23 18:50:59 +01:00
|
|
|
|
|
|
|
println!("Done");
|
|
|
|
Ok(())
|
|
|
|
}
|