mirror of
https://github.com/YGGverse/btracker.git
synced 2026-03-31 17:15:31 +00:00
handle images only
This commit is contained in:
parent
11d41d8bf6
commit
1978a05a82
1 changed files with 8 additions and 8 deletions
16
src/main.rs
16
src/main.rs
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue