=================================================================== RCS file: /cvs/openbsd/OpenBSDTorrents/MakeTorrents.pl,v retrieving revision 1.13 retrieving revision 1.19 diff -u -r1.13 -r1.19 --- openbsd/OpenBSDTorrents/MakeTorrents.pl 2005/05/03 05:33:15 1.13 +++ openbsd/OpenBSDTorrents/MakeTorrents.pl 2006/05/15 19:47:04 1.19 @@ -1,11 +1,11 @@ #!/usr/bin/perl -T -#$Id: MakeTorrents.pl,v 1.13 2005/05/03 04:33:15 andrew Exp $ +#$RedRiver: MakeTorrents.pl,v 1.18 2005/05/20 16:25:35 andrew Exp $ use strict; use warnings; use diagnostics; use lib 'lib'; -use BT::OBTMetaInfo; +use BT::MetaInfo::Cached; use OpenBSDTorrents; %ENV = (); @@ -110,7 +110,13 @@ my $torrent_with_path = $OBT->{DIR_NEW_TORRENT} . "/$torrent"; - my $t = BT::OBTMetaInfo->new(); + my $t = BT::MetaInfo::Cached->new( + { + cache_root => + $OBT->{DIR_HOME} . '/FileCache' + } + ); + $t->name($name); $t->announce($announce); unless ($announce =~ m!^http://[^/]+/!i) { @@ -132,7 +138,7 @@ return 0; } - my $hash = $t->info_hash_cached($torrent_with_path); + my $hash = $t->info_hash; $hash = unpack("H*", $hash); $t->save($torrent_with_path);