refactor: I ran clippy --fix
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use tokio;
|
|
||||||
use youtube::{create_default_metadata, load_oauth_config, load_video_metadata, YouTubeUploader};
|
use youtube::{create_default_metadata, load_oauth_config, load_video_metadata, YouTubeUploader};
|
||||||
use youtube_scheduler::*;
|
use youtube_scheduler::*;
|
||||||
|
|
||||||
|
|||||||
@@ -257,11 +257,10 @@ impl YouTubeUploader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn create_default_metadata(video_files: &[String], description_file: &str) -> Vec<VideoMetadata> {
|
pub fn create_default_metadata(video_files: &[String], description_file: &str) -> Vec<VideoMetadata> {
|
||||||
let expanded_path = expand_tilde(&description_file);
|
let expanded_path = expand_tilde(description_file);
|
||||||
video_files
|
video_files
|
||||||
.iter()
|
.iter()
|
||||||
.enumerate()
|
.map(|file_path| {
|
||||||
.map(|(_i, file_path)| {
|
|
||||||
let filename = Path::new(file_path)
|
let filename = Path::new(file_path)
|
||||||
.file_stem()
|
.file_stem()
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
@@ -269,7 +268,7 @@ pub fn create_default_metadata(video_files: &[String], description_file: &str) -
|
|||||||
.to_string();
|
.to_string();
|
||||||
|
|
||||||
VideoMetadata {
|
VideoMetadata {
|
||||||
title: format!("{}", filename),
|
title: filename.to_string(),
|
||||||
description: get_random_line(&expanded_path).unwrap_or_default(),
|
description: get_random_line(&expanded_path).unwrap_or_default(),
|
||||||
tags: vec!["gaming".to_string()],
|
tags: vec!["gaming".to_string()],
|
||||||
category_id: "20".to_string(), // GAMING
|
category_id: "20".to_string(), // GAMING
|
||||||
|
|||||||
Reference in New Issue
Block a user