handle images only

This commit is contained in:
yggverse 2025-08-02 10:20:13 +03:00
parent 11d41d8bf6
commit 1978a05a82

View file

@ -161,14 +161,6 @@ async fn main() -> Result<()> {
}
break;
}
if preload.max_filesize.is_some_and(|limit| info.len > limit) {
if config.debug {
println!(
"\t\t\ttotal files size limit `{i}` reached!"
)
}
break;
}
if info.relative_filename.extension().is_none_or(|e|
!matches!(e.as_bytes(), b"png" | b"jpeg" | b"jpg" | b"gif" | b"webp")) {
if config.debug {
@ -179,6 +171,14 @@ async fn main() -> Result<()> {
}
continue;
}
if preload.max_filesize.is_some_and(|limit| info.len > limit) {
if config.debug {
println!(
"\t\t\ttotal files size limit `{i}` reached!"
)
}
continue;
}
images.insert(info.relative_filename.clone(), info.len);
assert!(update_only_files.insert(id))
}