mirror of
https://framagit.org/veretcle/tootube.git
synced 2025-07-21 04:51:18 +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]
|
[package]
|
||||||
name = "tootube"
|
name = "tootube"
|
||||||
authors = ["VC <veretcle+framagit@mateu.be>"]
|
authors = ["VC <veretcle+framagit@mateu.be>"]
|
||||||
version = "0.5.3"
|
version = "0.5.5"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# 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 async_stream::stream;
|
||||||
use futures_util::StreamExt;
|
use futures_util::StreamExt;
|
||||||
use indicatif::{ProgressBar, ProgressStyle};
|
use indicatif::{ProgressBar, ProgressStyle};
|
||||||
use log::debug;
|
use log::{debug, warn};
|
||||||
use reqwest::{multipart::Form, Body, Client};
|
use reqwest::{multipart::Form, Body, Client};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::{cmp::min, error::Error, io::stdin};
|
use std::{cmp::min, error::Error, io::stdin};
|
||||||
@@ -309,10 +309,17 @@ pub async fn create_resumable_upload(
|
|||||||
) -> Result<String, Box<dyn Error>> {
|
) -> Result<String, Box<dyn Error>> {
|
||||||
let access_token = refresh_token(config).await?;
|
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 {
|
let upload_params = YoutubeUploadParams {
|
||||||
snippet: {
|
snippet: {
|
||||||
YoutubeUploadParamsSnippet {
|
YoutubeUploadParamsSnippet {
|
||||||
title: vid.name.clone(),
|
title: vid.name.chars().take(100).collect::<String>(),
|
||||||
description: vid.description.clone(),
|
description: vid.description.clone(),
|
||||||
tags: vid.tags.clone(),
|
tags: vid.tags.clone(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
Reference in New Issue
Block a user