mirror of
https://framagit.org/veretcle/tootube.git
synced 2025-07-20 20:41:17 +02:00
feat: add relevant debug bits
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use bytes::Bytes;
|
||||
use futures_core::stream::Stream;
|
||||
use log::debug;
|
||||
use std::error::Error;
|
||||
|
||||
mod error;
|
||||
@@ -31,6 +32,7 @@ pub async fn run(config: Config, pl: Vec<String>) {
|
||||
});
|
||||
|
||||
let dl_url = get_max_resolution_dl(latest_vid.streaming_playlists.as_ref().unwrap());
|
||||
debug!("PT download URL: {}", &dl_url);
|
||||
|
||||
let pt_stream = get_dl_video_stream(&dl_url)
|
||||
.await
|
||||
@@ -39,10 +41,12 @@ pub async fn run(config: Config, pl: Vec<String>) {
|
||||
let resumable_upload_url = create_resumable_upload(&config.youtube, &latest_vid)
|
||||
.await
|
||||
.unwrap_or_else(|e| panic!("Cannot retrieve the upload’s resumable id: {e}"));
|
||||
debug!("YT upload URL: {}", &resumable_upload_url);
|
||||
|
||||
let yt_video_id = now_kiss(pt_stream, &resumable_upload_url, &config.youtube)
|
||||
.await
|
||||
.unwrap_or_else(|e| panic!("Cannot resume upload!: {e}"));
|
||||
debug!("YT video ID: {}", &yt_video_id);
|
||||
|
||||
if !pl.is_empty() {
|
||||
add_video_to_playlists(&config.youtube, &yt_video_id, &pl)
|
||||
|
Reference in New Issue
Block a user