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

Diff for /openbsd/OpenBSDTorrents/MakeTorrents.pl between version 1.13 and 1.20

version 1.13, 2005/05/03 05:33:15 version 1.20, 2006/07/24 19:03:53
Line 1 
Line 1 
 #!/usr/bin/perl -T  #!/usr/bin/perl
 #$Id$  # -T
   #$RedRiver: MakeTorrents.pl,v 1.19 2006/05/15 18:47:04 andrew Exp $
 use strict;  use strict;
 use warnings;  use warnings;
 use diagnostics;  use diagnostics;
   
 use lib 'lib';  use lib 'lib';
 use BT::OBTMetaInfo;  use BT::MetaInfo::Cached;
 use OpenBSDTorrents;  use OpenBSDTorrents;
   
 %ENV = ();  %ENV = ();
Line 110 
Line 111 
   
     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 => '/tmp/OBTFileCache'
           }
       );
   
     $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.13  
changed lines
  Added in v.1.20

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