diff --git a/Cargo.toml b/Cargo.toml index 2221b15..e05d0ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,14 +1,14 @@ [package] name = "downloader" -version = "0.1.2" +version = "0.1.3" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] google_bigquery = { git = "https://github.com/OMGeeky/google_bigquery" } -google_youtube = { git = "https://github.com/OMGeeky/google_youtube" } -twitch_data = { version="0.1.3", git = "https://github.com/OMGeeky/twitch_data" } +google_youtube = { version="0.1.1",git = "https://github.com/OMGeeky/google_youtube" } +twitch_data = { version="0.1.4", git = "https://github.com/OMGeeky/twitch_data" } downloader_config = { version="0.2.0", git = "https://github.com/OMGeeky/downloader_config" } tokio = "1.23" google-bigquery2 = "4.0.1" @@ -18,4 +18,4 @@ log = "0.4.17" simplelog = "0.12.1" path-clean = "1.0.1" -log-panics = { version = "2", features = ["with-backtrace"]} \ No newline at end of file +log-panics = { version = "2", features = ["with-backtrace"]} diff --git a/src/lib.rs b/src/lib.rs index 87ff309..0f0fd67 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -191,7 +191,7 @@ async fn backup_not_downloaded_videos<'a>( continue; } let video_file_path = video_file_path.unwrap(); - + info!("Splitting video into parts"); let mut video_parts = split_video_into_parts( video_file_path.to_path_buf(), Duration::minutes(config.youtube_video_length_minutes_soft_cap), @@ -393,13 +393,17 @@ pub async fn split_video_into_parts( //endregion //region maybe join last two parts - trace!("Deciding if last two parts should be joined"); + debug!("Deciding if last two parts should be joined"); if let Some(last_path) = last_path { if let Some(current_path) = current_path { let joined_time = last_time + time; if joined_time < duration_soft_cap.num_seconds() as f64 { //region join last two parts - info!("Joining last two parts"); + info!( + "Joining last two parts. second last part duration: {} seconds, \ + last part duration: {} seconds, joined duration: {} seconds", + last_time, time, joined_time + ); //remove the part from the result that is going to be joined res.pop(); diff --git a/src/main.rs b/src/main.rs index 0d64762..dbd7108 100644 --- a/src/main.rs +++ b/src/main.rs @@ -66,7 +66,7 @@ async fn main() -> Result<(), Box> { } pub async fn sample() -> Result<(), Box> { - println!("Hello from the downloader lib!"); + info!("Hello from the downloader lib!"); let client = BigqueryClient::new(PROJECT_ID, DATASET_ID, Some(SERVICE_ACCOUNT_PATH)).await?; sample_bigquery(&client).await?; @@ -86,10 +86,10 @@ pub async fn sample() -> Result<(), Box> { } async fn sample_twitch<'a>(client: &TwitchClient<'a>) -> Result<(), Box> { - println!("\n\nGetting videos..."); + info!("\n\nGetting videos..."); let res = client.get_channel_info_from_login("burn").await?; - println!("got channel info: {:?}", res); + info!("got channel info: {:?}", res); let channel_id = res.unwrap().broadcaster_id; let videos: Vec