version 1.15, 2005/05/04 01:48:35 |
version 1.17, 2005/05/05 22:52:45 |
|
|
use diagnostics; |
use diagnostics; |
|
|
use Time::Local; |
use Time::Local; |
|
use Fcntl ':flock'; |
|
|
use lib 'lib'; |
use lib 'lib'; |
use OpenBSDTorrents; |
use OpenBSDTorrents; |
use BT::OBTMetaInfo; |
use BT::MetaInfo::Cached; |
|
|
%ENV = (); |
%ENV = (); |
|
|
|
|
next; |
next; |
} |
} |
|
|
|
|
my $t; |
my $t; |
eval { $t = BT::OBTMetaInfo->new( $torrent ); }; |
eval { $t = BT::MetaInfo::Cached->new( $torrent ); }; |
|
|
if ($@) { |
if ($@) { |
warn "Error reading torrent $torrent\n"; |
warn "Error reading torrent $torrent\n"; |
|
|
next; |
next; |
} |
} |
|
|
my $hash = $t->info_hash_cached($torrent); |
my $hash = $t->info_hash; |
$hash = unpack("H*", $hash); |
$hash = unpack("H*", $hash); |
|
|
|
undef $t; |
|
|
$files{torrent}{$name}{$epoch}{info_hash} = $hash; |
$files{torrent}{$name}{$epoch}{info_hash} = $hash; |
|
|
undef $t; |
|
|
|
if (exists $keep{$name}) { |
if (exists $keep{$name}) { |
if (exists $keep{$name}{$hash}) { |
if (exists $keep{$name}{$hash}) { |