=================================================================== RCS file: /cvs/openbsd/OpenBSDTorrents/ServerTorrents.pl,v retrieving revision 1.13 retrieving revision 1.16 diff -u -r1.13 -r1.16 --- openbsd/OpenBSDTorrents/ServerTorrents.pl 2005/05/05 18:48:19 1.13 +++ openbsd/OpenBSDTorrents/ServerTorrents.pl 2005/05/07 20:01:01 1.16 @@ -1,5 +1,5 @@ #!/usr/bin/perl -T -#$Id: ServerTorrents.pl,v 1.13 2005/05/05 17:48:19 andrew Exp $ +#$Id: ServerTorrents.pl,v 1.16 2005/05/07 19:01:01 andrew Exp $ use strict; use warnings; use diagnostics; @@ -9,7 +9,7 @@ use lib 'lib'; use OpenBSDTorrents; -use BT::OBTMetaInfo; +use BT::MetaInfo::Cached; %ENV = (); @@ -117,7 +117,16 @@ print "Uploading $file\n"; my $t; - eval { $t = BT::OBTMetaInfo->new("$OBT->{DIR_TORRENT}/$file"); }; + eval { + $t = BT::MetaInfo::Cached->new( + $file, + { + cache_root => + $OBT->{DIR_HOME} . '/FileCache' + } + ); + }; + if ($@) { warn "Error reading torrent $file\n"; return undef;