[BACK]Return to MakeTorrents.pl CVS log [TXT][DIR] Up to [local] / openbsd / OpenBSDTorrents

Diff for /openbsd/OpenBSDTorrents/MakeTorrents.pl between version 1.12 and 1.16

version 1.12, 2005/05/02 22:49:54 version 1.16, 2005/05/06 21:07:22
Line 5 
Line 5 
 use diagnostics;  use diagnostics;
   
 use lib 'lib';  use lib 'lib';
 use BT::OBTMetaInfo;  use BT::MetaInfo::Cached;
 use OpenBSDTorrents;  use OpenBSDTorrents;
   
 %ENV = ();  %ENV = ();
Line 29 
Line 29 
 {  {
         my $basedir = shift;          my $basedir = shift;
   
         return undef if $basedir =~ /packages/;          #return undef if $basedir =~ /packages/;
   
         my ($dirs, $files) = Get_Files_and_Dirs($basedir);          my ($dirs, $files) = Get_Files_and_Dirs($basedir);
         if (@$files) {          if (@$files) {
Line 110 
Line 110 
   
     my $torrent_with_path = $OBT->{DIR_NEW_TORRENT} . "/$torrent";      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->name($name);
     $t->announce($announce);      $t->announce($announce);
     unless ($announce =~ m!^http://[^/]+/!i) {      unless ($announce =~ m!^http://[^/]+/!i) {
Line 132 
Line 138 
         return 0;          return 0;
     }      }
   
     my $hash = $t->info_hash_cached($torrent_with_path);      my $hash = $t->info_hash;
     $hash = unpack("H*", $hash);      $hash = unpack("H*", $hash);
   
     $t->save($torrent_with_path);      $t->save($torrent_with_path);

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.16

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>