mirror of
https://github.com/OMGeeky/twba.splitter.git
synced 2026-01-01 09:03:46 +01:00
fix clippy hints
This commit is contained in:
@@ -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?;
|
||||
|
||||
@@ -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") {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user