Menu

#44 inteligent filters

open
nobody
None
5
2002-06-17
2002-06-17
No

I added the following to save_file

requires image::
size

any files with an extension in $img_ext are checked
with imgsize and rejected if they have too little total resolution

if ($e =~ /\.$img_ext/) {

    $globe\_x = 1;

    $globe\_y = 1;
    $globe\_id = "";
    \($globe\_x,

$globe_y, $globe_id) = imgsize($outfile);
print
"[resolution = $globe_x x $globe_y type = $globe_id]\n";
if
(( $globe_x * $globe_y) < 250000 ) {
$skipdup = 1;
}

\}

Something similart could be done with MP3's, and audio
file types to restrict DL'd files to specific max or min sizes, or max
and min sample rates, ...

I added this section in save_file
that allowes me to have a list of specific file extensions to
automatically ignore

if ($outfile =~ /(.+\.($reject_ext))/)
{
$skipdup = 1;
}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB