refactor: add gif to extra_files and bypass array length specification

This commit is contained in:
2026-11-22 01:50:41 +01:00
parent d0014711c8
commit 777e7055f1
2 changed files with 7 additions and 14 deletions
+2 -3
View File
@@ -12,7 +12,7 @@ use std::path::PathBuf;
pub fn move_files(
file_path: PathBuf,
tag: Tag,
extra_files: [String; 9],
extra_files: &[String],
should_copy: bool,
has_parent: bool,
add_new_playlist: bool,
@@ -64,7 +64,7 @@ pub fn move_files(
new_playlist(target.join(file_name))?;
}
for ext in &extra_files {
for ext in extra_files {
let pattern = file_path.parent().unwrap().join(format!("*.{}", ext));
let paths: Vec<_> = glob(pattern.to_str().unwrap())?.collect::<Result<_, _>>()?;
@@ -109,7 +109,6 @@ fn new_playlist(path: PathBuf) -> std::result::Result<(), std::io::Error> {
.append(true)
.open(new_playlist_path)
.unwrap();
println!("{:?}", path);
writeln!(new_playlist, "{}", path.display())
}