mirror of
https://framagit.org/veretcle/tootube.git
synced 2025-07-20 20:41:17 +02:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bf622d6989 | ||
![]() |
a687f008df | ||
![]() |
e2ab93c04e | ||
![]() |
9e1c27be29 | ||
![]() |
ab9ea1a8ee |
538
Cargo.lock
generated
538
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "tootube"
|
||||
authors = ["VC <veretcle+framagit@mateu.be>"]
|
||||
version = "0.5.3"
|
||||
version = "0.5.5"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
@@ -6,7 +6,7 @@ use crate::{
|
||||
use async_stream::stream;
|
||||
use futures_util::StreamExt;
|
||||
use indicatif::{ProgressBar, ProgressStyle};
|
||||
use log::debug;
|
||||
use log::{debug, warn};
|
||||
use reqwest::{multipart::Form, Body, Client};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{cmp::min, error::Error, io::stdin};
|
||||
@@ -309,10 +309,17 @@ pub async fn create_resumable_upload(
|
||||
) -> Result<String, Box<dyn Error>> {
|
||||
let access_token = refresh_token(config).await?;
|
||||
|
||||
if vid.name.chars().count() > 100 {
|
||||
warn!(
|
||||
"PT Video Title ({}) is too long, it will be truncated",
|
||||
&vid.name
|
||||
);
|
||||
}
|
||||
|
||||
let upload_params = YoutubeUploadParams {
|
||||
snippet: {
|
||||
YoutubeUploadParamsSnippet {
|
||||
title: vid.name.clone(),
|
||||
title: vid.name.chars().take(100).collect::<String>(),
|
||||
description: vid.description.clone(),
|
||||
tags: vid.tags.clone(),
|
||||
..Default::default()
|
||||
|
Reference in New Issue
Block a user