fix clippy hints

This commit is contained in:
OMGeeky
2024-04-28 12:35:10 +02:00
parent 47836aa8d6
commit 2320fb35cd
3 changed files with 3 additions and 5 deletions

View File

@@ -57,7 +57,7 @@ impl SplitterClient {
async fn inner_split_video(&self, id: &str) -> Result<usize> {
let base_path = Path::new(&self.conf.download_folder_path);
let input_path = base_path.join(format!("{}.mp4", id));
let output_folder_path = base_path.join(&id);
let output_folder_path = base_path.join(id);
info!("Splitting video with id: {}", id);
verify_paths(base_path, &input_path, &output_folder_path).await?;

View File

@@ -67,7 +67,7 @@ async fn join_last_two_parts(input_parts: &mut PlaylistInfo, base_folder: &Path)
.parts
.last_mut()
.ok_or(SplitterError::JoinRequiresAtLeastTwoParts)?;
second_last_part.duration = second_last_part.duration + last_part.duration;
second_last_part.duration += last_part.duration;
let second_last_part_path = combine_path_as_string(base_folder, &second_last_part.path)?;
let last_part_path = combine_path_as_string(base_folder, &last_part.path)?;
let join_txt_path = base_folder
@@ -147,7 +147,7 @@ pub(crate) async fn get_playlist_info(playlist_path: &PathBuf) -> Result<Playlis
.map_err(SplitterError::PlaylistParse)?) as u64 as i64,
);
last_duration = Some(duration);
total_duration = total_duration + duration;
total_duration += duration;
} else if line.starts_with("#EXT-X-ENDLIST") {
break;
} else if line.starts_with("#EXT") {

View File

@@ -1,7 +1,5 @@
use crate::errors::SplitterError;
use prelude::*;
use twba_backup_config::prelude::Config;
use twba_backup_config::Conf;
pub mod client;
pub mod errors;